in reply to Man, File::Tail is just beating me down!
In your code this:
if (!defined $first_record) { $first_record = $line;
seems really dangerous as you can't say for certain the contents of $line. Could be a null, a lone line terminator or whatever the last thing was you wrote to the socket. I know you may have convinced yourself there are only valid records but the validation checks need to be done in code and not in the head. Put the validation checks in the code elsewise you're just guessing.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Man, File::Tail is just beating me down!
by hallikpapa (Scribe) on Jan 18, 2008 at 02:45 UTC | |
by starbolin (Hermit) on Jan 18, 2008 at 06:18 UTC | |
by hallikpapa (Scribe) on Jan 18, 2008 at 19:12 UTC | |
by starbolin (Hermit) on Jan 19, 2008 at 00:22 UTC |