in reply to Re^2: Filename Surrounded by Quotes in a Scalar Variable Causes Open to Fail
in thread Filename Surrounded by Quotes in a Scalar Variable Causes Open to Fail
The underlying system calls for open accept a C string on both POSIX and Windows. The double-quote character is perfectly valid in filenames on POSIX, but forbidden on Windows — this is why you are getting an "Invalid argument" error. Wrapping the file name in quotes is valid on both POSIX (under a Bourne shell) and Windows when forming shell commands, but Perl's open does not involve the shell and simply passes the string you give it to the system.
|
|---|