use Win32::PerfLib; %tasklist = get_remote_process_list($_[0]); foreach $pid (keys %tasklist) { print "$pid -- $tasklist{$pid}\n"; }