in reply to "Swarming"
#!/usr/bin/perl @a = qw(one two three); %h = map({$_ => $count++} @a); print "$_ => $h{$_}\n" foreach (keys(%h)); foreach (sort( {$h{$a} <=> $h{$b}} keys(%h))) { print "$_\n"; }
Janitored by tye: Add CODE tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: "Swarming"
by radiantmatrix (Parson) on Jul 20, 2006 at 19:37 UTC |