Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
however I keep getting the messagemy @indicies = sort { $a[$a] <=> $a[$b] } 0..$#list;
#!/usr/local/bin/perl -w @list = (4,9,3); my @indicies = sort { $a[$a] <=> $a[$b] } 0..$#list; print ("\n @indicies");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: sorting and indicies
by broquaint (Abbot) on May 23, 2002 at 14:53 UTC | |
|
Re: sorting and indicies
by termix (Beadle) on May 23, 2002 at 14:56 UTC | |
|
Re: sorting and indicies
by vladb (Vicar) on May 23, 2002 at 14:53 UTC |