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

Re: Re: Re: Replacing text - problem with $1 variable

by Hutta (Scribe)
on Sep 03, 2003 at 12:33 UTC ( [id://288612]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Replacing text - problem with $1 variable
in thread Replacing text - problem with $1 variable

perl -pi -e 's/\$_(GET|POST)\[([^\]]*)]/lc($1) . "($2)"/egm;' test.php
Assuming there's no nested square brackets inside your argument list to $_GET[] and $_POST[], that will work.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-03-29 00:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found