Getting around the percent sign.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • starlight849
    New Member
    • Jun 2009
    • 82

    Getting around the percent sign.

    This has been solved

    I am passing a variable that needs to be evaluated with a print command. An example of my variable may look like this "variabl%e"

    I understand that the best way to get around the percent problem would be to simply add another percent sign to the variable and then it would evaulate out to one percent.

    Is there an option in the print command printf that will handle this without the need of adding the extra percent? Also, are there any other operators that will give similar trouble when using the printf command?

    If not, what would be the quickest way in which I could add the extra percent sign into the variable on the fly, and return the variable with the newly added percent.
    Last edited by starlight849; Jan 16 '12, 08:46 PM. Reason: Solved
  • RonB
    Recognized Expert Contributor
    • Jun 2009
    • 589

    #2
    Your explanation of what you need doesn't make much sense.

    Is "variabl%e" the name of your variable, or its value?

    What type of variable are you referring to, a scalar, an array, or a hash?

    Please post your code so we can see what you're doing and explain what you want it to do vs what it it doing.

    Comment

    Working...