Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2016-12-09 23:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (158 votes). Check out past polls.