The 'die' command, when presented with an argument not terminated with a newline, appends the location where 'die' was called, along the currently selected filehandle, and the current line number of that file, where available. The tieing is irrelevant; '<$fh> line 119' means that $fh is the currently selected filehandle, and 119 is the last line that was read from that file (it should match $.). 119 does not indicate the number of lines in the file.
Dave. | [reply] |
Hey Dave, thanks for the reply.
Ok, that makes sense then. I was wondering because I do certain things in the script like splicing out some lines from that
file and stuff like that so a few times it would say something like "<$fh> line 101", but when I'd check the file there
would only be 80 or something less then what it reported... So that makes a little more sense now.
Do you think I should use something other then "die" there? Maybe just "exit", or something like that?
Thanks again for the explanation, much appreciated!
Thanks Again,
Matt
| [reply] |