use strict; my $str = "aabceezazerrfde"; my %values = ('a' => 7, 'e' => 2, 'z' => 26); my $total = 0; foreach(split '',$str){ if($values{$_}){ $total += $values{$_}; } } print "Total: $total";
In reply to Re: numerology experiment
by TheForeigner
in thread numerology experiment
by orange
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |