Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: tr operator in eval -- updated

by BillKSmith (Monsignor)
on Sep 27, 2020 at 13:48 UTC ( [id://11122264]=note: print w/replies, xml ) Need Help??


in reply to Re^2: tr operator in eval -- updated
in thread tr operator in eval -- updated

Try removing the first backslash from my post and run it again. Study the output. It should be very clear that the first two tests are "not ok". Could you have found the problem yourself if you had seen this before you posted? After the first test fails, it should be clear that the second test does not stand a chance because it is evaluating the wrong string. Look at the string in the output. Note that both variables are interpolated. If you could not solve the problem at this point you could at least have asked the right question: "How can I interpolate one variable in a string, but not the other?" (The answer of course is to escape the dollar sign so that it will be treated as a literal character, not as the sigil of a variable.)
Bill

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11122264]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-19 14:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found