I was going to say that you can avoid the shell enterely passing the command and arguments to open separately:
open my $H, '-|', $mkvext, 'chapters', $item;
Then, I remembered that on Windows, at the OS level, a command is not invoked as a list of program+arguments but as a single line so, I don't now what would happen.
Does the execv emulation used by perl internally take care of quoting the arguments properly? | [reply] [d/l] [select] |
salva, unfortunately you are right. This is what will happen:
List form of pipe open not implemented at -e line 1.
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
| [reply] [d/l] |
Does the execv emulation used by perl internally take care of quoting the arguments properly?
As far as I can tell Perl doesn't emulate execv and execvp on Windows, instead the emulation is provided by Windows. According to that doc, "Spaces embedded in strings may cause unexpected behavior", so it seems the answer to your question would be No. Hence the need for modules like Win32::ShellQuote.
| [reply] [d/l] [select] |