And foreach over (@array) doesn't build a new array, and foreach over (<FILEHANDLE>) doesn't slurp the whole file either. Not really a hack there. That is what foreach is for. Building a quick list to foreach over is cool, but throwing a huge list together in a hurry is hard, and worse, eats scads of memory.
The while loop is much better for large hashes like this case.
--
$you = new YOU;
honk() if $you->love(perl)
In reply to RE: Re: each or keys?
by extremely
in thread each or keys?
by rdw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |