perl_fold fixed