in reply to sorting and indicies
Note the use of strict on the first line as this is very important when learning your way around perl and beyond. For example if you'd used strict in your example you would've got an informative warning message telling you Variable "@a" is not imported and 3 error messages relating to variables not being full qualified.use strict; my @list = (4,9,3); my @indicies = sort { $list[$a] <=> $list[$b] } 0 .. $#list; print "@indicies\n";
_________
broquaint
|
|---|