in reply to Execute regexp on directory tree
One advice, its better to use a negated character class:$line =~ s/$regexp/$substitute/ee;
Update I forgot to say that then you have to change the substitution pattern to something to be evaluated:qr/throw "([^"]+)"/;
my $substitute = q{qq<throw ("$1")>};
|
|---|