Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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


Comment on Re: substitution of a string with Square brackets.
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2014-11-29 00:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (200 votes), past polls