Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Making escape (\) ordinary in double quotes

by AnomalousMonk (Chancellor)
on Apr 09, 2013 at 09:34 UTC ( #1027688=note: print w/replies, xml ) Need Help??


in reply to Making escape (\) ordinary in double quotes

sprintf does not alter the interpolation behavior of a double-quoted string, but it does provide all the interpolation capability of double-quoting – and more! See the many format specifiers in the docs.

>perl -wMstrict -le "my $foo = 'Foo'; my $bar = 'Bar'; ;; my $x = sprintf 'ignore \slash, expand %s, %s.', $foo, $bar; print qq{'$x'}; " 'ignore \slash, expand Foo, Bar.'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1027688]
help
Chatterbox?
[Corion]: Mhmm. Our datawarehouse is named after the department, except that the department changed its name one year ago. Now I guess I'm looking for the moral equivalent of "THE Datawarehouse", where "THE" stands for "Traditional High-valued Expertise" ;)

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2017-07-26 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (386 votes). Check out past polls.