in reply to Re: Testing for a directory handle
in thread Testing for a directory handle
Of course, if it turns out that telldir was given something other than a handle, then it's a fatal error:C:\_32>perl -le "open D, '<','test.txt' or die $!; print 'dir' if defi +ned telldir D; print 'DONE';" DONE C:\_32>perl -le "opendir D, 'comp' or die $!; print 'dir' if defined t +elldir D; print 'DONE';" dir DONE
So that scenario would need to be avoided.C:\_32>perl -le "open D, '<','test.txt' or die $!; print 'dir' if defi +ned telldir $x; print 'DONE';" Bad symbol for dirhandle at -e line 1.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Testing for a directory handle
by kcott (Archbishop) on Jan 30, 2018 at 03:48 UTC |