kaka_2 has asked for the wisdom of the Perl Monks concerning the following question:
and Output is:use strict; use warnings; use Data::Dumper; $Data::Dumper::Terse=1; my $StatChk="cat /tmp/teststatus.txt | grep -v OK"; my $GoodStat="OK"; my @SChk_Out; open (DChk, "$StatChk |") || die "Failed: $!\n"; @SChk_Out = <DChk>; close (DChk); print "Output of command is =".Dumper(@SChk_Out);
how can i have output just[ 'Station 7777: Not good. ', 'Station 7778: Not Good ' ]
Station 7777: Not good. Station 7778: Not good.
it is important that i use the Dumper. in my actual program i cant just print array. (kind of limitation)
any help in this regard will be appriciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: refine output of Dumper
by choroba (Cardinal) on Oct 24, 2014 at 10:08 UTC | |
|
Re: refine output of Dumper
by McA (Priest) on Oct 24, 2014 at 10:13 UTC | |
|
Re: refine output of Dumper
by marto (Cardinal) on Oct 24, 2014 at 10:08 UTC | |
by kaka_2 (Sexton) on Oct 24, 2014 at 10:23 UTC | |
by Tux (Canon) on Oct 24, 2014 at 11:38 UTC | |
by Anonymous Monk on Oct 24, 2014 at 11:12 UTC | |
|
Re: refine output of Dumper
by Loops (Curate) on Oct 24, 2014 at 10:19 UTC | |
|
Re: refine output of Dumper
by RonW (Parson) on Oct 24, 2014 at 16:31 UTC |