C:\test\DBMNested>p1 [0] Perl> sub getChecksum($) { my $in = shift; our $check = 0; $in =~ m/(?:(.)(?{$check += ord($1);}))*^/; return $check; };; print getChecksum( 'foo' );; 324 print getChecksum( 'foo' );; 324 print getChecksum( 'foobar' );; 633