Maybe it'll take 2 or 3 days to understand what is goin'on here... ;-)@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;
In reply to Re: Pearls (not really) of Perl programming
by cosimo
in thread Pearls (not really) of Perl programming
by PetaMem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |