in reply to Re: How to make a array of hashes and search them
in thread How to make a array of hashes and search them

There seems to be only one global variable with name @array. Thus \@array always returns a reference to the same array, which is probably not what you want.

The solution is to use strict; and declare your variables in appropriate scopes.