in reply to How to get specific hash elements?
First, values returns a list of values, not just a single value. You're assigning it in scalar context, so what you're getting is the number of values that it would return if you'd used it in a list context. That said, I suspect that values isn't even what you want to be using.
If you do an assignment like this (I can't see the foreach loop you say is working):
$hash{$variable_name}{'fixed name'} = 'val-you';
...then you can get that value out with the same expression you used in the assignment ($hash{$variable_name}{'fixed name'}).
|
|---|