Hai,In the "%random_name" hash, $bob is treated as a string if its not declare.>
Try this,
use strict; my $bob="hai"; my @array=('hai'); my %random_name = ( $bob => "something"); foreach (@array) { my $value = $random_name{$_}; print "value: $value\n"; };
Regards,
Velusamy R.
In reply to Re: calling a hash
by Samy_rio
in thread calling a hash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |