Help for this page

Select Code to Download


  1. or download this
    my @stuff;
    while (<>) {
    ...
        else { push @stuff, $_;  }
    }
    print grep { /keyword/ } @stuff;
    
  2. or download this
    my $last_entry;
    while (<>) {
        if (/^\s/) {
    ...
        }
        print $last_entry if $last_entry =~ /keyword/ && eof(IN);
    }