Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Isn't there a print line function?

by nardo (Friar)
on Sep 04, 2001 at 19:43 UTC ( #110062=note: print w/replies, xml ) Need Help??


in reply to Isn't there a print line function?

If you want to find which lines match a pattern you an use grep and if you want to print all them out you can use something like:
print join('', grep(/whatever/, @lines));
If you just want to print out the first match you can use
print ((grep(/whatever/, @lines))[0]);

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2022-05-17 18:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (68 votes). Check out past polls.

    Notices?