Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Perl as grep

by gjb (Vicar)
on Dec 02, 2003 at 15:22 UTC ( #311642=note: print w/ replies, xml ) Need Help??


in reply to Perl as grep

The -p argument doesn't take an argument and prints any line read. What you want is:

perl -n -e "print if /regex/" *.*

Hope this helps, -gjb-


Comment on Re: Perl as grep
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2016-02-09 06:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (305 votes), past polls