Tony -- ...and then Akens, Anthony said... % % Found another problem... % % The line % my @inputP = qx!ps -e |grep $port!; % is matching a bit overzealously... For instance, % if $port = pts/6 it matches (and therefore would kill) % not only processes on port pts/6, but also pts/61, pts/62 % etc.
While I'm not a fan of doing qx! process | another process ! but instead want to do as much in perl, certainly you could try my @inputP = qx!ps -e|grep $port'[^0-9]'!; to exclude any extra digits. % % Is there a better way to limit that? There always is. This might not even be one of them :-) % % Tony Akens % [EMAIL PROTECTED] :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
msg25898/pgp00000.pgp
Description: PGP signature