The size of a scalar has a minimum overhead. Anything below about 20 characters (guess) in length requires the same amount of memoryEr, no. A scalar that is only ever used as a number will use less memory than a scalar used as a string (even one of zero length).
$ perl -e 'push @a, 1 for 1..100000; system"ps -flp $$"' .... SZ .... 608 $ perl -e 'push @a, "" for 1..100000; system"ps -flp $$"' .... SZ .... 905
In reply to Re: Re: Re: Re: Weighting rand()
by dave_the_m
in thread Weighting rand()
by hacker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |