it doesn't work because you don't have an array of hashes,
but an array of references to hashes. arrays can only contain
scalar values in perl.
to get the hash the first element of the array refers to,
use my %hash1 = %{ $hashes[0] };
checkout perldata, perlref, perllol etc.