Scarborough has asked for the wisdom of the Perl Monks concerning the following question:
A simple question, on a windows based network would it be possible to open a file and then not be able to read it at a later stage due to a network failure for example. If so is there a read error. The code I am using is as follows,
Maybe my wording is wrong or a little misleading
Thanks for the help. UPDATEopen RESTART, "x:\\myfiles\file.txt" or die; while(<RESTART>){ #do something with $_ }
Maybe my wording is wrong or a little misleading
open RESTART, "x:\\myfiles\file.txt" or die; #Assume the file opens correctly while(<RESTART>){ #do something with $_ #My Worry is if the network collapses in this #loop. Will I know about it or will it hang? }
20040414 Edit by BazB: Changed title from 'Open and reading files'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Detecting read errors whilst reading from a network drive
by hmerrill (Friar) on Apr 14, 2004 at 12:00 UTC | |
Re: Detecting read errors whilst reading from a network drive
by crabbdean (Pilgrim) on Apr 14, 2004 at 12:07 UTC | |
by Anonymous Monk on Apr 14, 2004 at 12:24 UTC | |
by crabbdean (Pilgrim) on Apr 14, 2004 at 12:37 UTC | |
Re: Detecting read errors whilst reading from a network drive
by PodMaster (Abbot) on Apr 14, 2004 at 12:05 UTC | |
Re: Detecting read errors whilst reading from a network drive
by iburrell (Chaplain) on Apr 14, 2004 at 19:52 UTC |
Back to
Seekers of Perl Wisdom