if ( grep $_ == $xpid, @procs ) { print "Pid is in use : $xpid\n"; }