in reply to Re^2: win32 parenthesis system weirdness
in thread win32 parenthesis system weirdness

Shell quoting is a real mess in Windows. It's basically impossible to do right programmatically. And Perl might even make it even worse in some circumstances.

First, let's see how it doesn't work since you've kept that a secret from us:

>perl a.pl 'C:\img\del' is not recognized as an internal or external command, operable program or batch file.

I suspect Perl is executing the following commands:

>cmd /c "C:\img\del me\three (3\00000253.jpg" 'C:\img\del' is not recognized as an internal or external command, operable program or batch file. >cmd /c " "C:\img\del me\three (3\00000253.jpg"" [cutest bunny ever is displayed]

(Cutest bunny ever)

Don't ask my why those commands are those that are run. Don't ask my why that second one even works. Cause I'm not sure I can answer.

See Re^4: win32 parenthesis system weirdness for a solution.