Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Using a regex saved in an environment variable

by JavaFan (Canon)
on May 03, 2012 at 08:28 UTC ( #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
Node Status?
node history
Node Type: note [id://968674]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2017-12-11 06:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (287 votes). Check out past polls.

    Notices?