Help for this page

Select Code to Download


  1. or download this
    open(T,"<$ARGV[0]");
    my (@data,$count);
    foreach((@data = <T>)){++$count;(/$ARGV[1]/)?eval{print;for(1..$ARGV[2
    +]){print $data[$count] if defined $data[++$count];};exit()} : undef;}
    close(T);
    
  2. or download this
    one
    two
    ...
    werwr
    werwer
    seen?
    
  3. or download this
    # perl -w script.pl datafile pattern numlines
    perl -w script.pl data.dat test 4