Calculate Finnish payment reference numbers (Perl)