perl: Translate C examples into Perl and include a manual page.