in reply to Re^3: specific field selection
in thread specific field selection
#!/usr/bin/perl use strict; use warnings; $address = 'user@gmail.com'; my @hostname = ("hostname -s"); my @email = ("echo $hostname array issue | mail -s 'Array problem' $ad +dress"); my @args = ("cciss_vol_status /dev/ciss0 > checkstatres.txt"); system(@args); open RESULTS, "checkstatres.txt" or die "can't open datafile: $!\n"; while (<RESULTS>){ my @F=split(/:/, $_); if ( $F[2] =~ /OK./){ ;; } else{ my $hostname = system(@hostname); system(@email); } } my @args2 = ("rm checkstatres.txt"); system(@args2);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: specific field selection
by NetWallah (Canon) on Mar 08, 2008 at 01:32 UTC |