in reply to RE: Re: Wordlist maker
in thread Wordlist maker

Actually, that's an interesting question. With the one large string you have the overhead of allocating memory to append the string. I don't know any details in the internals of the memory management involved in that, but we know there is some overhead.

On the other hand, multiple prints with carriage returns will cause the stdio routines to flush to the file or console, so you're invoking the overhead of the system I/O routines for each line, as opposed until waiting for the one big line. And if it's not flushing ($| = 1), then you still have the overhead for the buffer management within stdio.

Anyone know any more details on that? Is it more efficient to let Perl do it's memory management on a big string, or let stdio do it's thing?

--Chris

e-mail jcwren