Home: Perl Programming Help: Intermediate:
array: maximum size limitation?


Sep 24, 2003, 11:28 AM

Views: 1046
array: maximum size limitation?

Are there any character size or byte size limitations for Perl arrays or number of element limitations? Are there any overall limits or limits to specific elements of an array? Are there any rule of thumb limits commonly recognized by Perl coders when working with arrays? Would 10,000 characters in a single element of an array be considered too much? Any help aprreciated. I looked through the documentation on the perldoc website but did not find anything about size limitations at all.

Thaumaturge / Moderator

Sep 25, 2003, 12:43 AM

Views: 1044
Re: [KevinR] array: maximum size limitation?

Array size is limited only by the available memory. 10,000 characters doesn't sound too big, but if you had 1,000 elements each containing 10,000 characters that might start to cause a problem.

You cna use the CPAN module Devel::Size to detemine how much space your variables are taking up.

Dave Cross, Perl Hacker, Trainer and Writer
Get more help at Perl Monks


Sep 25, 2003, 9:03 AM

Views: 1042
Re: [davorg] array: maximum size limitation?

Thanks Dave, I will check CPAN and the module you mentioned.

Much appreciated.