Scope is just not for Fresh Breathby notsoevil (Pilgrim)
|on Dec 28, 2000 at 22:39 UTC||Need Help??|
notsoevil has asked for the wisdom of the Perl Monks concerning the following question:
With warnings (-w) on, the following code produces a 'use of uninitialised value in join' error:
The above was what I attempted after first using (which produced the same error):
The while loop keeps looping until the expression evaluates to false. The fetchrow_array method returns an empty list when there is no more data, and Perl treats that as a false value; and so the loop stops. So I cannot see why join would see @data with an uninitialized value.
I am sure I am overlooking something obvious, but perhaps not. I, a humble acolyte, seek your wisdom.