in reply to Using SYSTEM2 on Windows

It uses select on pipes, a unix feature. Use IPC::Run instead.
use IPC::Run qw( run ); run( [ cmd => '/c', 'dir' ], '>', \my $out, '>', \my $err, ) or die "dir: $?" print "OUT: $out ERR: $err";