Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Storing system grep's output to an array in perl

by SuicideJunkie (Priest)
on Mar 07, 2013 at 19:03 UTC ( #1022290=note: print w/ replies, xml ) Need Help??


in reply to Re: Storing system grep's output to an array in perl
in thread Storing system grep's output to an array in perl

Or even better:

my @tops; open my $inputFileHandle, '<', $filename or die "could not open '$file +name', because the OS said: $!"; while ( <$inputFileHandle> ) { if ( m/^top \- (\d{2}:\d{2}:\d{2})/ ) { push @tops, $1; } }


Comment on Re^2: Storing system grep's output to an array in perl
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2014-11-29 04:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (203 votes), past polls