in reply to Re^4: Hash sorting (by value) woes
in thread Hash sorting (by value) woes
True, but it would be slower.
print map { ...1... } ...2...;
is closer to
@temp_list = map { ...1... } ...2...; print @temp_list;
than to
print ...1... foreach ...2...;
The extra assignment slows things down. (About twice as slow, IIRC previous tests.)
Update: Fixed brain fart R.J. noticed.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Hash sorting (by value) woes
by Roy Johnson (Monsignor) on Feb 24, 2005 at 18:03 UTC |