in reply to Re: Error reading line from file: Operation timed out
in thread Error reading line from file: Operation timed out
you should probably check if the file exists before you try to open it (just restating what moritz said).
No (and it's also not what I said).
If you first check if the file exists, and then try to open it, the file could be created or removed just between those two operations, which gives you a wrong result.
So the rule of common sense when dealing with the world outside is never to check and then try, but simply to try, and if it went wrong look at what went wrong (which $! tells you).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Error reading line from file: Operation timed out
by robertobouza (Initiate) on May 13, 2009 at 19:15 UTC | |
|
Re^3: Error reading line from file: Operation timed out
by RoyCrowder (Monk) on May 13, 2009 at 19:45 UTC | |
by moritz (Cardinal) on May 13, 2009 at 20:24 UTC | |
by RoyCrowder (Monk) on May 13, 2009 at 20:34 UTC | |
by robertobouza (Initiate) on May 13, 2009 at 20:10 UTC |