Help for this page

Select Code to Download


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