use strict; my $interesting_process="ftp"; # Adjust to taste my @processlist=grep(/$interesting_process/,`ps -fe`); #backtics are evil - consider Proc::ProcessTable