in reply to Choosing the sort routine on the fly

I use string eval for the sort function. Btw. can anyone tell me if this is evaled forevery comparison ?
my $szSortFunction = '$a cmp $b'; my @szSortedLines = sort { eval $szSortFunction } @szLinesToSort;

Replies are listed 'Best First'.
Re^2: Choosing the sort routine on the fly
by tilly (Archbishop) on Sep 09, 2006 at 00:59 UTC
    I can confirm that it is evaled for every comparison.