lanx@nc10-ubuntu:~$ perl use strict; { use warnings; sub test { my $x = shift; } } my %hash = ( a => "a" ); my $key; test $hash{$key} Use of uninitialized value in scalar assignment at - line 3. lanx@nc10-ubuntu:~$ perl -version This is perl, v5.10.0 built for i486-linux-gnu-thread-multi