Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^4: Regex returns match the first time. It returns everything thereafter

by aaron_baugher (Curate)
on Nov 18, 2013 at 21:27 UTC ( [id://1063202]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Regex returns match the first time. It returns everything thereafter
in thread Regex returns match the first time. It returns everything thereafter

Something like this should work:

my $found=0; print grep { $found or ( /line/ and $found=1 )} @ssh;

Aaron B.
Available for small or large Perl jobs and *nix system administration; see my home node.

  • Comment on Re^4: Regex returns match the first time. It returns everything thereafter
  • Download Code

Log In?
Username:
Password:

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

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

    No recent polls found