Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -p
    11..exit
    
  2. or download this
    while (<>) {
      11..exit;
    } continue { print }
    
  3. or download this
    #!/usr/bin/perl
    print+(<>)[-10..-1]
    
  4. or download this
    #!/usr/bin/perl
    map--$.>9||print,<>
    
  5. or download this
    for (<>) {
      print unless --$. > 9;
    }
    
  6. or download this
    #!/usr/bin/perl -p
    $\=$_.$\}{
    
  7. or download this
    while (<>) {
      $\ = $_ . $\
    } {;
    } continue { print }
    
  8. or download this
    #!/usr/bin/perl
    @_=<>;print@_[$#_/2..@_/2]
    
  9. or download this
    #!/usr/bin/perl
    printf"%010d\n",$.,<>