in reply to Re: array pre-allocation trick
in thread array pre-allocation trick

Sounds like you want to have a look at the map function, actually. my @array = map { do_stuff_with($_); $_ } 1 .. 5000;

Makeshifts last the longest.