in reply to Re^6: Random data generation.
in thread Random data generation.

It is not a bug, gen_salva2 is designed to work that way!

$buf is populated by gen_salva2 but instead of generating data for just one output string it generates data for 100 of them (a few less, actually). Next calls to gen_salva2 do not need to fill $buf again as it already contains data (until exhausted, then it is refilled).

That's also the reason my previous comment said it was faster on average!

Replies are listed 'Best First'.
Re^8: Random data generation.
by furry_marmot (Pilgrim) on Jun 29, 2010 at 18:44 UTC

    OOOHHHHhhhhhh... Now I get it. Never mind. :-(