in reply to Re^2: Hidden Secrets of PERL
in thread Hidden Secrets of PERL

The reason is history. The ability to write:
foreach my $variable (LIST) {...}
was relatively recent (5.004 I think). Before one had to write
my $variable; foreach $variable (LIST) {...}

As usual, it's combining old Perl DWIM, new features and backwards compatability that leads to oddities like this. Luckely, for most people, it all just works, and old programs don't break.