in reply to Re^3: opening accented file names
in thread opening accented file names
This works for me on WinXP with ActivePerl on a file named i.txt, but it fails if the file is called í.txt.use strict; use warnings; my $fn; print "\nType filename.\n"; chomp ($fn = <STDIN>); print "\nOpening file named $fn\n"; if (open my $fh, '<', $fn) { print "Successfully opened file '$fn'\n"; close $fh; } else { print "Error opening file '$fn': $!\n"; }
|
---|