I've found this in our code base, though I'm proud to say that this is not my stuff... :-)

` @aFieldsList = sort {
$a eq 'listtype' and -1 or
$b eq 'listtype' and 1 or
$a eq 'listcode' and ( $b ne 'listtype' and -1 or 1 ) or
$b eq 'listcode' and ( $a ne 'listtype' and 1 or -1 ) or
$a eq 'funclist' and ( $b !~ /^(listtype|listcode)$/ and -1 or
+ 1 ) or
$b eq 'funclist' and
( $a !~ /^(listtype|listcode)$/ and 1 or -1 )
} @aFieldsList;
`

Maybe it'll take 2 or 3 days to understand what is goin'on here... ;-)

Comment onRe: Pearls (not really) of Perl programmingDownloadCode