in reply to array size

There is always a limit. Perl asks the operating system for memory. The operating system either gives perl however much memory perl asks for, or it gives it nothing. The operating system takes care of any "caching" to swap memory , but its not unlimited.

See also how apply large memory with perl? (and the links therein)