Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Using a regex saved in an environment variable

by JavaFan (Canon)
on May 03, 2012 at 08:28 UTC ( [id://968674]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    export REX="/--Begin--/ && /--End--/"
    echo $REX
    /--Begin--/ && /--End--/
    
  2. or download this
    perl -00 -ne 'print if '$REX file.txt
    
  3. or download this
    perl -00 -ne 'print if /--Begin--/ && /--End--/' file.txt
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-19 07:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found