in reply to Win32 System() Weirdness

To see what's really happening behind the curtain, change an env variable -- it's called PERLSHELL or something like that, but it ignores the usual COMSPEC -- to point to a stub that just prints argv's in main. Might also call GetCommandLine (something like that, Win32 API call) to see what it looked like before the standard library parsed it into words, and see where your quotes (still) were.

I suspect that quotes may be getting lost.

It's working fine for me, with ActiveState build 628, with the line:

system '"C:\Program Files\Utilities\DskBench.exe" x y z' or die "$! $ +^E";
This is Win2K. Maybe Win9x w/Command.COM has problems, I don't know.

If all else fails, as a work-around use the short-name alias for the long directory names.

Hmm... playing around with it more, I found that it fails if there is another set of quotes!!

system '"C:\Program Files\Utilities\DskBench.exe" x y "foo z"' or die + "$! $^E";
fails as you note.

I have a dim memory of a case where I couldn't get system to work right, and ended up spitting out a batch file and running that.

It is clearly a bug somewhere in the system processing. If you do tests like I suggested above, you might find that the presense of more quotes makes them all stripped, or something like that.

—John