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