http://www.perlmonks.org?node_id=1136283


in reply to issue with grep in the output of a command

Hi janasec,

You can split and grep like this:

use Data::Dumper; my @out = grep /FC_DVT/, split("\n", $out); print Dumper( \@out ) . "\n";
and the output is
$VAR1 = [ 'cfg: FC_DVT MEZZI; MEZZI1', 'cfg: FC_DVT' ];
UPDATE 'use' line was edded.