This is happening because you're not dereferencing an array.
Maybe something like:
use strict; use warnings; use Data::Dumper; # This will give you a clearer idea of what you data actually looks li +ke print Dumper($AoH); # This assumes that $data is an index (integer) my $year = $AoH->[$data]{'YEAR'};
If this doesn't work for you, post the contents of the Data::Dumper output, and we'll talk some more.
In reply to Re: Coerce array into hash problem
by thezip
in thread Coerce array into hash problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |