in reply to Re^5: quoting issue with system command (Win32)
in thread quoting issue with system command
system(@list) bypasses the shell under Unix (and similar OSes) because system uses the Unix-like shell in order to parse command-line arguments. Under Win32, using the shell (cmd.exe) is done for other reasons. In both environements, I/O redirection is something that the shell is used for.
In Win32, cmd.exe is also used for getting at quite a few "internal" commands including "echo", "dir", "copy", and "move". So even if you don't have any "shell meta characters", cmd.exe will get invoked if trying to run the command without it fails (basically).
ActiveState doesn't maintain Perl source code. The code in question is very likely in http://cpansearch.perl.org/src/NWCLARK/perl-5.8.9/win32/win32.c, for example.
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: quoting issue with system command (internals)
by John M. Dlugosz (Monsignor) on May 15, 2009 at 15:38 UTC |