in reply to substitution of a string with Square brackets.
you should wrap $2 with quotes, i.e. \Q$2\E
Mickey
Enjoy,$line =~ s#$methodname\((\Q$2\E)\)#private $methodname(\Q$2\E)#g
Mickey
|
---|
In Section
Seekers of Perl Wisdom