develooper Front page | perl.perl5.porters | Postings from July 2013


Thread Next
H.Merijn Brand
July 23, 2013 14:41
Message ID:

mkdir "foo";
my $filename = abs_path (File::Spec->catdir ("foo", "bar.txt"));
open my $fh, ">", $filename or die "$filename: $!";

will barf on Windows (incl Cygwin) because the file does not yet exist

 foo\bar.txt: No such file or directory at line 16

it doen't even reach the open

This works fine on all *nix

Cwd does not document this behavior

H.Merijn Brand   Perl Monger
using perl5.00307 .. 5.19   porting perl5 on HP-UX, AIX, and openSUSE

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About