> cmd > test_shell > perl my $res = `cmd`; open (TEST, ">test_perl1"); print TEST $res; close TEST; open (TEST, ">test_perl2"); open (CMD, "cmd |"); binmode CMD; #Tried with and without this. while () { print TEST "$_"; } close CMD; close TEST; #Let dos shell do io? The 'cmd /C' bit should be superfluous.(?) #End result is the same either way. `cmd /C "mycmd > test_perl3"`; EOF > wc -l test_shell test_perl1 test_perl2 test_perl3 111 test_shell 107 test_perl1 107 test_perl2 107 test_perl3