Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: substitution of a string with Square brackets.

by mickeyn (Priest)
on Mar 20, 2006 at 10:38 UTC ( #537909=note: print w/replies, xml ) Need Help??


in reply to substitution of a string with Square brackets.

you should wrap $2 with quotes, i.e. \Q$2\E
$line =~ s#$methodname\((\Q$2\E)\)#private $methodname(\Q$2\E)#g
Enjoy,
Mickey

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://537909]
help
Chatterbox?
[jedikaiti]: Hi Monks

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2017-10-23 15:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (280 votes). Check out past polls.

    Notices?