Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Escaping multiple escape chars

by JamesNC (Chaplain)
on Dec 09, 2005 at 20:17 UTC ( [id://515642]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $txt = ' \*/  ';
    $txt =~s/\\/\\\\/g;  # what I expected ' \\*/ ';
    print $txt;
    
  2. or download this
    $txt = ' __\\U//__ ';
    $txt =~s/\\/\\\\/g;
    print $txt;
    #prints __\\U//__
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://515642]
Approved by jdporter
Front-paged by Roy Johnson
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-16 05:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found