in reply to Put references to array of hash elements in an array
Precedence!
$$age_ref[1] means ${$age_ref}[1] not ${$age_ref[1]}
@AoH = ( { name => Adam, age => 0 }, { name => Bob, age => 10 }, { name => Cat, age => 20 } ); @age_ref = (\$AoH[0]{age},\$AoH[2]{age}); print "\${\$age_ref[1]} = ${$age_ref[1]} = $AoH[2]{age}\n"; # prints ${$age_ref[1]} = 20 = 20
HTH! :)
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
|
|---|