CPU: Perl, Fall 2005 Perl, Week 2: Arrays, Hashes, Control Structures #21

undef as a Number

$count = 1;
while ( $count < 5 ) {
    $total += $count;
    $count++;
}
print "The total: $total\n";
Copyright © 2005 Ian Langworth