Help for this page

Select Code to Download


  1. or download this
    my $counter;
    
    ...
    $counter++;
    print "Line number is : $counter\n";
    }
    
  2. or download this
    while ( <$fh> ) {
    print "Line number is :" . $. . "\n";
    }