use warnings; use strict; print "here it goes...\n"; my $return_val = open(my $article, "-|", "caesar ## c:\usr\pm>openprog.pl > openprog.txt 2>&1 here it goes... The system cannot find the file specified. tried it and got [14048] #### use warnings; use strict; use Win32::Process::List; $!=0; print "here it goes...<$!>\n"; my $return_val = open(my $article, "-|", "caesar \n"; print "="x75,"\n"; my %list = Win32::Process::List->new()->GetProcesses(); #returns the hashes with PID and process name foreach my $key ( keys %list ) { # $list{$key} is now the process name and $key is the PID print sprintf("%30s has PID %15s", $list{$key}, $key) . "\n" if $key == $return_val; } print "="x75,"\n"; #### here it goes...<> The system cannot find the file specified. tried it and got [8664] =========================================================================== cmd.exe has PID 8664 ===========================================================================