in reply to Alphabetical values

Use a hash for the table.

my %table = ( A => 123, b => 200, ... ); my $sum = 0; $sum += $table{$_} for split //, $word;

Replies are listed 'Best First'.
Re^2: Alphabetical values
by perlish (Initiate) on Dec 16, 2008 at 07:56 UTC
    thank you for your quick response ikegami & moritz