Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    my $x=0;open(OF, ">OUT.txt");open(IF, "<IN.txt");
    while(<IF>){if(/$ARGV[1]/){print OF "$_" if $x < $ARGV[0];$x++}}
    close IF;close OF;