Thanks Ketema P.S. the array is of references to hashes and the array is sorted based on a numeric attribute of those hashes.@known = sort byIndex(@known); splice(@known,(the correct Index),1,$newValue); sub byIndex{ $a->{'Attribute'} <=> $b->{'Attribute'}; } print "Done\n";
In reply to Insert Into a Sorted Array by ketema
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |