Help for this page

Select Code to Download


  1. or download this
    my @history = ('') x 3;
    while (<>) {
    ...
        push @history, $_;
        shift @history;
    }
    
  2. or download this
    my @history = ('') x 4;
    while (<>) {
    ...
        shift @history;
        print @history, $_ if /pattern/;
    }