We don't bite newbies here... much | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The current file handle that <> is using is stored in ARGV, but my testing shows that perl has alrady closed ARGV when the while (<>) {...} loop terminates.
You might try checking $! to see if that gets set when the NFS server stops serving the file: Update: ikegami pointed out that testing $! (as in if ($!) ... doesn't make sense here. One issue is that $! is only set when there is an error. One way around this is to force a known error at the end of the loop so that you can tell if readline generated an error. Update 2: One can assign to $!, so this should be able to detect if readline failed: } </c> In reply to Re: When <> fails
by pc88mxer
|
|