in reply to Re^6: Handling file path with unusual characters
in thread Handling file path with unusual characters
The first warning happens, because you don't check the return value of open. Use the following instead:
open FILE, '<', $path or die "Couldn't open '$path': $!";
The failure you will then discover happens because Perl expects filenames to have no encoding respectively passes the data from the script through directly to the OS, but your script is likely encoded in something other than Latin-1 or whatever Windows uses as the current default locale. See Opening files with japanese/chinese chars in filename for related discussion.
|
|---|