Regarding Perl vs OCaml:
An (impressive) implementation of all the solutions of the Perl Cookbook
in the Objective CAML language (used at the time) is available here:
PLEAC-Objective CAML
Re-writing these examples with “modern” code/libraries could be very interesting.