On Wed, 7 Nov 2001, Craig A. Berry wrote: > I've made some progress getting this test to run (see working patch below) > but I still get one failure: > > not ok 28 # POSIX::errno(): 20, $!: not a directory > > 20 is the correct value for ENOTDIR, but how can POSIX::errno() and $! be > expected to be numerically equal when $! returns a string? Or is it really > just checking to see if errno has not been set? >
$! is magic. It returns the number in numeric context and the error message in string context. for example: % perl -e 'open FH,"blagggg" or print 0+$!' 2 % perl -e 'open FH,"blagggg" or print $!' No such file or directory -- Tim Jenness JAC software http://www.jach.hawaii.edu/~timj