Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Printing th entire line with a keyword

by RichardK (Parson)
on Dec 31, 2012 at 11:25 UTC ( #1011044=note: print w/replies, xml ) Need Help??


in reply to Printing th entire line with a keyword

You could use the -n switch if you wanted a one line solution -

 perl -ne 'print if /key/' *.txt

see perlrun for the full details.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1011044]
help
Chatterbox?
[Corion]: Meh. I'm reviving some old code, and it seems it used a module DBIx::Loader, but it doesn't exist on CPAN, and I can't even remember writing such a module... Maybe parts of it live on in DBIx::RunSQL, but not the parts I need right now :)

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2018-06-24 08:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (126 votes). Check out past polls.

    Notices?