saintex has asked for the wisdom of the Perl Monks concerning the following question:
Why Have I: "Use of uninitialized value in string eq " ?use strict; sub askName { chomp(my $nome=<STDIN>); my %nomi=( "fred"=>'flinstone', "barney"=>'rubble', "wilma"=>'flinstone' ); for (%nomi) { print $_ if ($nomi{$_} eq $nome); } } &askName;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Use of uninitialized value in string eq
by FunkyMonk (Bishop) on Feb 20, 2010 at 11:11 UTC | |
by saintex (Scribe) on Feb 20, 2010 at 12:16 UTC |