c:\@Work\Perl\monks>perl -le "use strict; ;; foo(); sub foo (my $x) { my $x = 'hiya'; print $x; } " hiya #### c:\@Work\Perl\monks>perl -le "use strict; use warnings; ;; foo(); sub foo (my $x) { my $x = 'hiya'; print $x; } " Illegal character in prototype for main::foo : my$x at -e line 1. main::foo() called too early to check prototype at -e line 1. hiya