Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^5: double quote vs single quote oddities. I need enlightenment

by furry_marmot (Pilgrim)
on Jul 08, 2010 at 18:27 UTC ( [id://848746]=note: print w/replies, xml ) Need Help??


in reply to Re^4: double quote vs single quote oddities. I need enlightenment
in thread double quote vs single quote oddities. I need enlightenment

In non-interpolated strings, a double-backslash is interpreted as a single back slash.

print '\\.', "\n", '\.', "\n"; ------ \. \.

If you look at the docs for split, it specifically says it's expecting a /PATTERN/. So it interprets both '\\.' and '\.' as /\./.

--marmot

Log In?
Username:
Password:

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

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

    No recent polls found