Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Another 'ode to backslash' ;-)

by hopes (Friar)
on Oct 02, 2001 at 23:00 UTC ( #116235=note: print w/replies, xml ) Need Help??


in reply to Re: Another 'ode to backslash' ;-)
in thread Another 'ode to backslash' ;-)

There is an error in your code. See perldoc perlop
or see perlop

q/STRING/
'STRING'
A single-quoted, literal string. A backslash represents a
backslash unless followed by the delimiter or another backslash,
in which case the delimiter or backslash is interpolated.


So '\' don't is what you expect. You have to write '\\' instead.
Yeah, it's tricky. Note that
print '\\\machine';
is the same as
print '\\\\machine';
but not
print '\\machine';
You can use q;\\; if you want to obfuscate more.

Regards

Hopes

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2021-01-25 15:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?