in reply to Call external exe

To respond to ikegami and Bloodnok at the same time, I guess Ikegami is right, no Expect on Win32 (unless Cygwin). Also IPC::Open3 will not work on Win32 reliably, although on linux it would be the ideal solution. See Perl/Tk App and Interprocess Communication The problem is with select on the READ filehandle. You may be able to use IPC::Open3 if you know for sure what the prompt will be from the exe, and you can just feed it your data with a little time delay in between.
#!/usr/bin/perl use warnings; use strict; use IPC::Open3; my ($age, $height, $weight) = (50,72,250); #yeah I'm fat :-) #my $pid = open3(\*WRITE, \*READ, \*ERROR, 'somecmd.exe'); my $pid = open3(\*WRITE, \*READ,0,'somecmd.exe'); #if \*ERROR is false, STDERR is sent to STDOUT #send query to cmd print WRITE "$age\n"; #give cmd time to output select(undef,undef,undef,.5); print WRITE "$height\n"; select(undef,undef,undef,.5); print WRITE "$weight\n"; select(undef,undef,undef,.5); #get the answer from cmd if needed chomp(my $answer = <READ>); print "$answer\n"; waitpid($pid, 1);

I'm not really a human, but I play one on earth Remember How Lucky You Are