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; } }