If $AoH is an array of hashes, then your line should be my $year = $AoH[ data ]->{ 'YEAR' } || '';
As it is now, it tries to coerce the array $AoH into a hash, and fails.
Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."
In reply to Re: Coerce array into hash problem
by psini
in thread Coerce array into hash problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |