in reply to Fast Recall

I'm having a hard time finding the question. Caching 6 lines?
my @cache = (undef) x 6; while (<>) { ... shift @cache; push @cache, $_; }