# Collection of code snippets by Arne Vajhøj 
# posted to eksperten.dk, usenet and other places (2002-now) 
open(F, "num.txt");
$sum = 0;
while($line = <F>) {
    $sum = $sum + $line;
}
close(F);
print "Sum=$sum \n";
