in reply to what is the maximum elements storage in a Hash or an array variable
Perl does not impose arbitrary limits on the size of its datastructures. You could pull a 10 gigabyte file into a single scalar variable if your operating system supported such large files, and your available memory and swapspace could handle it.
But just because you can read the entire phone book from the state of California into memory at once doesn't mean you should. And just because Perl would let you doesn't mean your system can handle it. There won't be an "overflow", but there could be a lot of hard drive churning as the swapfile fills, lots of sluggish system behavior, and eventually some sort of error message letting you know you have completely saturated your system's resources.
If your datastructure has the potential of growing beyond your system's capability for handling it efficiently, you'll have to look for other solutions such as only holding a portion of the data in memory at a given time, or using a database.
Dave
|
|---|