use strict; my $foo = 42; print "$foo\n"; # 42. No surprises here bar(); print "$foo\n"; # 17! How did that happen? # ...hundreds of lines of code... sub bar { ... $foo = 17; # Oops! Forgot "my" ... }