#!/usr/bin/perl -w my $sum=0; while(<>) { $sum += $_; } print $sum . "\n";