Help for this page
my @history = ('') x 3; while (<>) { ... push @history, $_; shift @history; }
my @history = ('') x 4; while (<>) { ... shift @history; print @history, $_ if /pattern/; }