Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Execute regexp on directory tree

by Anarion (Hermit)
on Dec 12, 2001 at 14:41 UTC ( [id://131205]=note: print w/replies, xml ) Need Help??


in reply to Execute regexp on directory tree

If you want to replace for the content of $1 you must use /ee modifier to the regex.
$line =~ s/$regexp/$substitute/ee;
One advice, its better to use a negated character class:
qr/throw "([^"]+)"/;
Update I forgot to say that then you have to change the substitution pattern to something to be evaluated:
my $substitute = q{qq<throw ("$1")>};

$anarion=\$anarion;

s==q^QBY_^=,$_^=$[x7,print

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2025-07-11 09:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.