Tidied Perl code