There's more than one way to do things | |
PerlMonks |
Re: Easier than foreach $key (keys %links) loopby merlyn (Sage) |
on Nov 22, 2000 at 03:44 UTC ( [id://42832]=note: print w/replies, xml ) | Need Help?? |
The problem is that there's no place to insert a "sort" here. And if you abort the loop early, you run the risk of leaving the secret "each" pointer sitting somewhere in the middle of the hash, confusing the next such loop.
So, "easier" is all relative. If this floats your boat, use it. -- Randal L. Schwartz, Perl hacker
In Section
Cool Uses for Perl
|
|