I came across this error when I run follow code on windows.
and if changed the command `dir` to `ipconfig`, it's ok.
I guess it because dir is a cmd internal command but ipconfig isn't.

Can anybody explain it for me.

Thanks

code:

use strict;
use IPC::Run qw(run timeout);

my @cmd = qw(dir);
my ($in, $out, $error);
open $in, "<in.txt";
open $out, ">out.txt";
open $error, ">error.txt";

run \@cmd, $in, $out, $error, timeout(10) or die "error: $?";

close $in;
close $out;
close $error;


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to