#perl use warnings; use strict; use Math::BigFloat; my $id = 11768; my $land = 'DE'; my $wert = Math::BigFloat->new($id.(ord(substr($land,0,1))-55).(ord(substr($land,1,1))-55)); print sprintf('%02d',98 - ($wert->bmod(97)));