in reply to Re^4: Design hints for a file processor
in thread Design hints for a file processor
{ my $line = <DATA>; chomp $line; $line =~ s/^\s+//: # handles '$lines[0]' sub peek { return $line; } # handles 'shift @lines' sub next_line { my $tmp = $line; $line = <DATA>; chomp $line; $lines =~ s/^\s+//; return $tmp; } # handles boolean check for @lines sub is_exhausted { return !defined $line } }
I didn't test it, but it should work along these lines.
Instead of nitpicking details, think on the overall architecture and fix small issues for yourself.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Design hints for a file processor
by PhilHibbs (Hermit) on Jul 09, 2008 at 12:51 UTC |