Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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?
[Corion]: LanX: Ah, yeah - Frankfurt is in the quake region, but at the very border. I think I've never noticed a quake in Frankfurt myself
[marto]: good morning all
[Corion]: On another topic, in the process of Rubber Duck SoPWing, I wrote a post about the best API for generating HTTP requests (not sending them) and while writing it and fleshing out my sample implementation, I came up with some improvements to my ...
[Corion]: ... existing prototype. Cartesian Products will be proud of that module once it gets out ;)
[Corion]: Hi marto ;)
LanX has the same problem with English accents ...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2017-01-18 10:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (161 votes). Check out past polls.