Rewrite the front-end example from the 'dragonbook' in pure Perl.