The diagnostic for this error states: (F) The global variables $a and $b are reserved for sort comparisons. You mentioned $a or $b in the same line as the <=> or cmp operator, and the variable had earlier been declared as a lexical variable. Either qualify the sort variable with the package name, or rename the lexical variable. And indeed, it only complains under those circumstances. If I am foolish enough to do my $a; my @sorted_list = sort { sortfunc($a, $b) } @list; then it does not complain (and the list is unlikely to get sorted - could be a good obfuscated entry in the making here). Why can't the error be issued if a lexical $a/$b shows up anywhere in a sort block, not just in the same line as a comparison? -- Peter Scott Pacific Systems Design Technologies