Not_a_Number has asked for the wisdom of the Perl Monks concerning the following question:
Given a hash like this, and using warnings:
my %hash = ( a => undef, b => 'foo', c => undef );I naturally get two Use of uninitialized value warnings if I do:
print "$_ => $hash{$_}\n" for keys %hash;I understand that. How come, then, the following generates no warnings at all?:
print "$hash{$_} <= $_\n" for keys %hash;TIA
dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: "Use of uninitialized value" question
by dbwiz (Curate) on Oct 04, 2003 at 19:02 UTC | |
by Not_a_Number (Prior) on Oct 04, 2003 at 19:30 UTC | |
|
Re: "Use of uninitialized value" question
by Aristotle (Chancellor) on Oct 04, 2003 at 18:47 UTC |