in reply to sorting and indicies

I guess the warning you receive is related to the fact that the @a array is empty inside the code block you pass to sort.

I've tried to check the contents of the @a array using Data::Dumper:
#!/usr/local/bin/perl -w use Data::Dumper; @list = (4,9,3); my @indicies = sort { print Dumper(\@a); $a[$a] <=> $a[$b] } 0..$#list +; print ("\n @indicies");
And the output I got is this
$VAR1 = []; Use of uninitialized value in numeric comparison (<=>) at foo.pl line +4. Use of uninitialized value in numeric comparison (<=>) at foo.pl line +4. $VAR1 = []; Use of uninitialized value in numeric comparison (<=>) at foo.pl line +4. Use of uninitialized value in numeric comparison (<=>) at foo.pl line +4. 0 1 2
I guess you really wanted to use $list[$a] instead of, say, $a[$a]?

UPDATE: But, hey, why did marlyn use both @a and @list? *note: check the Q&A*

_____________________
$"=q;grep;;$,=q"grep";for(`find . -name ".saves*~"`){s;$/;;;/(.*-(\d+) +-.*)$/; $_=["ps -e -o pid | "," $2 | "," -v "," "];`@$_`?{print"+ $1"}:{print" +- $1"}&&`rm $1`; print$\;}