Re: [MacPerl-Porters] [ macperl-Bugs-472413 ] pwd result different from 5.20r4

[email protected] (Chris Nandor)
Newsgroups perl.macperl.porters
Message-ID <p05100307b7f608e39db8@[10.0.1.177]>
At 18:41 +0200 2001.10.19, Axel Rose wrote:
>But if I think of the new directive thus
>
>  everything ending with a colon is a volume or a directory
>  everything without a colon is a file

But that is not the directive.  The directive has to do with what *values*
are *returned* from standard MacPerl modules and functions and operators.
You can still leave off the ":" in opendir, -d, and anything else that
accepts a directory name.  This is just relating to Perl returning values
to you.

>I wonder why I get these results:
>
>  perl -e 'print "-> is a dir" if -d "Macintosh HD:Desktop Folder:"'
>  -> is a dir
>  perl -e 'print "-> is a dir" if -d "Macintosh HD:Desktop Folder"'
>  -> is a dir

Because Desktop Folder is a folder.  -d does not look at the name, it looks
at the actual item.

-- 
Chris Nandor                      [email protected]    http://pudge.net/
Open Source Development Network    [email protected]     http://osdn.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.