Perl folding + others