|
|
| go ahead... be a heretic | |
| PerlMonks |
Re^3: Filename Surrounded by Quotes in a Scalar Variable Causes Open to Failby jcb (Parson) |
| on Sep 04, 2020 at 01:23 UTC ( [id://11121343]=note: print w/replies, xml ) | Need Help?? |
|
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.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||