in reply to calling a hash
I think this would explain your results. Printing $random_name{$bob} is actually $random_name{''} and you are probably entering the string 'bob' at the prompt.
Try this to verify what you have in %random_name:
use Data::Dumper; print Dumper( \%random_name );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: calling a hash
by Anonymous Monk on Oct 04, 2005 at 13:26 UTC | |
by blazar (Canon) on Oct 04, 2005 at 13:37 UTC |