in reply to Windows: system("type ...") vs. system("cmd /c type ...")
Which perl are you using? Because I cannot reproduce this with AS1002.
Best guess: you are using cygwin which uses (c|z|ba|other)sh as the shell, but provides an executable or alias for dir?
c:\test>\Perl510\bin\perl.exe -v This is perl, v5.10.0 built for MSWin32-x86-multi-thread (with 3 registered patches, see perl -V for more detail) Copyright 1987-2007, Larry Wall Binary build 1002 [283697] provided by ActiveState http://www.ActiveSt +ate.com Built Jan 10 2008 11:00:53 [SNIP} c:\test>\Perl510\bin\perl.exe -wle"print $]; system q[type junk.pl]";; 5.010000 use threads; use strict; use warnings; print $], ' ', $threads::VERSION, "\n"; my $sub1 = sub { my $a=[ 1 .. 10000] }; my $m = 0; for (;;) { printf "\r%d\t", $m++; my $thr = threads->new( $sub1 )->join; undef $thr; } __END__ c:\test>
|
|---|