Help for this page

Select Code to Download


  1. or download this
    perl -nle '$t+=$_}{print$t'
    
  2. or download this
    LINE: while(<>) { 
      perl -nle '$t+=$_}{print$t
    }
    
  3. or download this
    perl -wnE '$s+=$_}{say$s'
    
  4. or download this
    Can't call method "say" without a package or object reference at -e li
    +ne 1, <> line 2.
    
  5. or download this
    perl -wnE '$s+=$_;END{say$s}'
    
  6. or download this
    $ perl -MO=Deparse -wnE '$s+=$_}{say$s'
    
  7. or download this
    BEGIN { $^W = 1; }
    LINE: while (defined($_ = <ARGV>)) {
    ...
    }
    -e syntax OK
    $