in reply to Re^2: Construct command portable way
in thread Construct command portable way
On Windows, system(@ARGS) is system("@ARGS"), so you need to take proper care of quoting.
No it's not, so no you don't.
>perl -e"@cmd = ('perl', '-le print for @ARGV', 'foo', 'bar'); system +@cmd;" foo bar >perl -e"@cmd = ('perl', '-le print for @ARGV', 'foo bar'); system @cm +d;" foo bar
The Windows command line cannot handle some characters. You need to verify for their presence, but you won't be able to quote them.
Of course it would be nice if Win32 system() knew when to add double quotes around strings...
ActivePerl does since 5.6.1. Can't verify Perl in general.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Construct command portable way
by Corion (Patriarch) on May 07, 2009 at 10:46 UTC | |
by ikegami (Patriarch) on May 07, 2009 at 11:12 UTC | |
by repellent (Priest) on May 07, 2009 at 20:32 UTC | |
by parv (Parson) on May 08, 2009 at 01:35 UTC |