1 #!/usr/bin/perl -w 2 use strict; 3 4 print "Perl $] \n"; 5 my %hash = ( a => undef, b => 'foo', c => undef ); 6 7 print "$_ => $hash{$_}\n" for keys %hash; 8 print "$hash{$_} <= $_\n" for keys %hash; 9 10 my $var = undef; 11 print "$var <= at the beginning\n"; 12 print "in the middle => $var <= \n"; __END__ Perl 5.006001 Use of uninitialized value in concatenation (.) or string at hash_prob.pl line 7. a => b => foo Use of uninitialized value in concatenation (.) or string at hash_prob.pl line 7. c => <= a foo <= b <= c <= at the beginning Use of uninitialized value in concatenation (.) or string at hash_prob.pl line 12. in the middle => <= Perl 5.008 Use of uninitialized value in concatenation (.) or string at hash_prob.pl line 7. c => Use of uninitialized value in concatenation (.) or string at hash_prob.pl line 7. a => b => foo Use of uninitialized value in concatenation (.) or string at hash_prob.pl line 8. <= c Use of uninitialized value in concatenation (.) or string at hash_prob.pl line 8. <= a foo <= b Use of uninitialized value in concatenation (.) or string at hash_prob.pl line 11. <= at the beginning Use of uninitialized value in concatenation (.) or string at hash_prob.pl line 12. in the middle => <=