Use a hash for the table.
my %table = ( A => 123, b => 200, ... ); my $sum = 0; $sum += $table{$_} for split //, $word;
In reply to Re: Alphabetical values
by ikegami
in thread Alphabetical values
by perlish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |