Nice! Heh, CHOMP... what would we do without fun keywords? I'm rather fond of
carp, croak, cluck, and confess.
As for the script itself, cool use for Perl. It looks just fine. I don't know if you're looking for suggestions, but a couple things popped into my head as I was reading.
You could pass
@chunk and
$line into
printchunk, returning the new line number. That way, if the program becomes larger it won't be cluttered up with globals. Also,
LPP is a seldom-used constant. It could have a more expressive name without too much extra typing.
That's all! Welcome to PerlMonks.