in reply to (jcwren) Re: Still confused
in thread Still confused

Actually, the value of $sum after my $sum is undefined.

The following program demonstrates that unless a scalar is set to a value it is initially undefined:

use strict; my $sum; unless (defined($sum)) { print '$sum is undefined', "\n"; } else { print 'The value of $sum is ', "$sum\n"; }
This program returns the message that $sum is undefined.