Prior to Perl 5.12 each expects a hash but you are giving it an array. From Perl 5.12 onward the code is syntactically correct, but probably doesn't do what you expect.
True laziness is hard work
Comment on Re: dereferencing multiple hash array structure