use strict; my($ps_cmd,$found); $ps_cmd = '/bin/ps -auwx'; open(IN,"$ps_cmd|") || die "Couldnt exec $ps_cmd\nReason: $!\n"; while ( ) { ($found++ && last) if ($_ =~ /inetd/); } print STDERR "Danger Will Robinson\n" if (!$found);