Craig A. Berry wrote:
At 5:23 PM -0800 3/1/08, Michael G Schwern wrote:
John E. Malmberg wrote:
What does it mean? Is it a synonym for cwd?
No. It means "SYS$DISK:[]." which is a file with a null name and
a null extension. A period delimiter between a file and the
>>> extension is always present.
Rather different from cwd. Ok then.
No, it *is* the same as cwd for all practical purposes. What John
said is technically true, but the important thing is that the null
components are supplied from the current working directory and
current volume. To any native utility, [] means the current working
directory on the current volume and is more or less equivalent to ./
on unixy systems. sys$disk:[] is really the same thing but just
specifies the current volume explicitly, which of course has no
equivalent on unixy systems.
'[]' is effectively cwd for all practical purposes because SYS$DISK: is
implied.
But above is explaining that '' is 'sys$disk:[].', note the trailing '.'
character which makes it different.
I think the reason catdir ignores an empty first component was that
splitdir used to create spurious empty first components, but that was
fixed here:
http://public.activestate.com/cgi-bin/perlbrowse/p/31431
Where things can get complex is that:
Unix /foo/bar/baz/ => VMS foo:[bar.baz] and 'foo:[bar.baz]' is not
valid input to splitdir.
If splitdir on VMS worked the same way as on Microsoft Windows, then
splitdir('foo:[bar.baz] would return ('foo:', 'bar', 'baz').
And since foo: is not a legal directory name in VMS syntax, it is not
ambiguous as what is needed. So that appears to be another bug.
It looks like we need some more comprehensive tests, including some with
illegal input to verify the error responses.
-John
[EMAIL PROTECTED]
Personal Opinion Only