in reply to Match into scalar
my $call = `mminfo -r 'volume,state,written,%used,space,pool,location, +ssinsert' -q 'ssinsert <= three week ago`;
to
my @call = `mminfo -r 'volume,state,written,%used,space,pool,location, +ssinsert' -q 'ssinsert <= three week ago`;
and change the loop so that you are matching against each line returned which will be in $_, not $call.
foreach ( @call ) { if ( /Daily\S+\s/ ) { print "Daily true $_ .\n"; } else { print "Not found\n"; } }
I hope this is of use.
Cheers,
JohnGG
Update: The OP seems to be a work in progress with silent updates occurring willy-nilly. The code problems I addressed in this reply no longer appear in the OP.
|
|---|