That limit will be imposed by the RAM available on your machine... though if it is not enough, you can always change your script to use an on disk tree with DB_File or similar module.
Comment on Re: what is the maximum elements storage in a Hash or an array variable