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

Cwd::abs_path

Thread Next
From:
H.Merijn Brand
Date:
July 23, 2013 14:41
Subject:
Cwd::abs_path
Message ID:
20130723164140.3d924543@pc09.procura.nl

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

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

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

it doen't even reach the open

This works fine on all *nix

Cwd does not document this behavior

-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.19   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About