Yet another take. Clear and elegant, but quite inefficient given large maximums.
{ my $count; my %h = map {$_ => ++$count} 'a'..'zzz'; sub alphabetic_to_base10 { return $h{ lc( $_[0] ) } or die; } }
In reply to Re: Alpha base-26 to base-10...
by Util
in thread Alpha base-26 to base-10...
by eduardo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |