Perl snippets