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

Re: Grepping the filehandler

by hippo (Bishop)
on Jul 23, 2020 at 15:52 UTC ( [id://11119714]=note: print w/replies, xml ) Need Help??


in reply to Grepping the filehandler

There will always be a loop whether expressed or implied. Here's an SSCCE:

#!/usr/bin/env perl use strict; use warnings; print /(error.*)/ ? $1 : '' for <DATA>; __DATA__ foo error bar baz

And the output is one line with error bar.


🦛

Log In?
Username:
Password:

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

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

    No recent polls found