Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    while(<>){}
    print "Last line number was $.\n";
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    while(<>){$totalLength += length($_);}
    print "Last line number was $.\n";
    print "Total length was $totalLength\n";