in reply to quandery about a grep statement
sub beautify { my %temp = map { $_ => 1 } @_; return sort { $a <=> $b } keys %temp; }
Of course, if you have a large array, this may not be efficient enough - you are making several copies of the array and on very large arrays that could hurt.
Your current code works ( I think ) because:
UPDATE: I just read this again and realized the tone is very wrong. I am not trying to be rude, but I suddenly slipped into writing a math proof. mikfire
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly)2: quandery about a grep statement
by tilly (Archbishop) on Mar 29, 2001 at 23:44 UTC |