http://www.perlmonks.org?node_id=443525


in reply to Re^2: How can I control interactive cli executables on Windows from Perl
in thread How can I control interactive cli executables on Windows from Perl

I understand. Since that is the case, here is what I recommend.

You can use two additional methods not already talked about above. first one is the system command which will allow you to execute commands to the exe and wait for completion.

system ("$ENV{'WINDIR'}\\system32\\telnet 10.1.1.10"); # OR ANY EXE AN +D PARAMETERS

Otherwise, you can use the backtick to take the output of a command and place it into a variable.

$test = `dir c:\\`; print scalar $test;

You can dump the output of system into a variable as well. Hope this helps