in reply to Intialization

When used in a numeric context (like the above), $i will automatically take on the value of 0. When used in a string context, an undef value will take on the value of the empty string.

However, I'm pretty sure that in some versions of Perl you get "unitialized value" warnings (when -w is turned on) when using an undef value in concatenation or in a numeric expression.

This is somewhat confirmed by this thread on clpm.

Also, note that if you have -w turned on, you'll get an "unitialized value" warning when you compare $i against 5 the first time through your while loop. See:

% perl -w my $i; while ($i<5) { $i++; } <Ctrl-D> Use of uninitialized value at - line 2.
Personally I find this rather annoying. :)