Help for this page
use strict; use warnings; ... my $tot = 0; $wanted{$_} && ($tot += $wanted{$_}) for (split //, $str); print "Total $tot\n";