Functional programming in Perl (work in progress)