Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Trying to get sum of elements in arrayby gargle (Chaplain) |
on Feb 06, 2015 at 12:05 UTC ( [id://1115771]=note: print w/replies, xml ) | Need Help?? |
About filling up your array... you're using a random index number and will only stop if there are 5 different indexes, possibly looping more than 5 times.
I find the following much more clean: It only loops 5 times, for sure:
-- if ( 1 ) { $postman->ring() for (1..2); }
In Section
Seekers of Perl Wisdom
|
|