in reply to Oddly growing array

Some points:
  • If you use strict you will notice interesting things about the code, namely
    Using an array as a reference is deprecated at lookingat.pl line 12.
    Which is
    ==12== @{$lines[$lino]}->[$blip++] = $atom;
  • You might want to use Data::Dumper in your original code to take a look at the array or if that seems like too much work just look at the last n items:
    print STDERR @lines[-5..-1]
    But I would take sk's advice and just REWRITE the entire thing.

    Celebrate Intellectual Diversity