my $foo; # Predeclared: bad style
# Usually done by C-coders, who predeclare a whole bunch of variables:
# my ($foo, $bar, $baz, $quux, $whatever, $i, $think, $is, $needed, $anywhere);
...
$foo = foo();
...
print $foo;
####
my $foo;
...
print $foo; # No error, just a warning at run time.
####
my $foo = foo(); # Declared when needed
...
print $foo;
####
...
print $foo; # Error at compile time!