Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 imbibing at the Monastery: (3)
As of 2017-03-25 14:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (311 votes). Check out past polls.