answer 10 in Perl