There are more tricks you could do with Perl syntax, including the continue block and the BEGIN block. See the perlsyn and perlmod manpages.