Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Storing a Hash Made of Two Arrays in Another Hashby tobyink (Canon) |
on Jan 10, 2012 at 18:01 UTC ( [id://947207]=note: print w/replies, xml ) | Need Help?? |
Something like this?
In your particular example, this line is wrong: $tickets { $values[0] } = %tmp_hash;You're trying to assign a hash into a scalar slot. You need to assign a reference to the hash instead: $tickets { $values[0] } = \%tmp_hash;See perldoc perlref and perldoc perllol.
In Section
Seekers of Perl Wisdom
|
|