Help for this page

Select Code to Download


  1. or download this
    my $line;
    while ($line = <>){
      print "$.\n" unless ($. % 10000);  # to keep track of the progress
    }
    
  2. or download this
    my $in = FileHandle->new($ARGV[0]);
    my $line;
    while ($line = $in->getline){
        print "$.\n" unless ($. % 10000);
    }
    
  3. or download this
    use IO::All;
    my $in = io($ARGV[0]);
    ...
    while ($line = $in->getline){
        print "$.\n" unless ($. % 10000);
    }