On Thu Jun 08 21:23:40 2006, johnh@isi.edu wrote: > #!/usr/bin/perl -w > > @scores = ( > '0000.0000.00039:0000.0008.0031.', > '0000.0000.00032:0000.0008.0024.', > '0002.0002.00033:0002.0011.0020.', > '0028.0028.00190:0077.0085.0028.'); > > @match_indices = (0,1,2,3); > sub sort_by_index($$) { > my($A,$B) = @_; > return $scores[$match_indices[$A]] cmp > $scores[$match_indices[$B]]; > } > @match_indices = sort sort_by_index @match_indices; > ---------------------------------------- This gives me: Bizarre copy of UNKNOWN in aelem at - line 12. in commit 42bd538f820268331bc55a66fa9df0673de69250 d963bf01c4c4db296760b1148f98bf668efcaf58, three commits later (the intervening commits affecting only documentation), gives Use of uninitialized value $match_indices[2] in array element at - line 12. Use of uninitialized value $match_indices[2] in array element at - line 12. Use of uninitialized value $match_indices[0] in array element at - line 12. but I can’t see how it fixes it.Thread Previous | Thread Next