following a Perl tutorial