Hello Monks,
i have following code which works well. only problem is output does not looks good.
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);
and Output is:
[
'Station 7777: Not good.
',
'Station 7778: Not Good
'
]
how can i have output just
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.