in reply to Use of grep with arrays/hashes
I prefer to use the map function for this type of hash population
map {$fields{$_}++} @fields;
This is not much different than merlyn's; his is probably faster though. I wonder why ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(ar0n) Re (2): Use of grep with arrays/hashes
by ar0n (Priest) on May 24, 2001 at 06:49 UTC | |
|
Re (tilly) 2: Use of grep with arrays/hashes
by tilly (Archbishop) on May 24, 2001 at 08:05 UTC |