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

Re: issue with grep in the output of a command

by pme (Prior)
on Jul 25, 2015 at 12:49 UTC ( #1136283=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2020-10-29 11:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (270 votes). Check out past polls.

    Notices?