develooper Front page | perl.perl5.porters | Postings from June 2008

Re: Cwd::abs_path behavior with non-existant paths

Thread Previous | Thread Next
John E. Malmberg
June 13, 2008 21:45
Re: Cwd::abs_path behavior with non-existant paths
Message ID:
Ken Williams wrote:
> On Thu, Jun 12, 2008 at 9:19 PM, John E. Malmberg <> wrote:
>> perl -mCwd -e "print Cwd::abs_path('foo/non-existant.file')"
>> perl -mCwd -e "print Cwd::abs_path('/foo/non-existant.file')"
>> perl -mCwd -e "print Cwd::abs_path('non-existant.file')"
>> [...]
>> On UNIX, the foo/non-existant.file returns nothing, but the other two return
>> the same as the input.
> Actually, on my Mac OS X install the first two return nothing and the
> last one returns the absolute form of the input.
> I tested under both 3.21 and 3.2701, same results.

Since there is no consistent results, I am thinking of have the default 
VMS mode for abs_path be the same as it is now, syntax only.

When VMS 0DS-5 mode is activated, the abs_path routine will work the 
same as on UNIX.  I will have to make a few adjustments because the 
alternate VMS code currently requires the file to exist as well as the path.

Personal Opinion Only

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