I'd prefer something more readable than concise. It's a concise enough problem anyway.
sub b26_to_b10 { my $base_10 = 0; for (split //, lc shift) { $base_10 *= 26; $base_10 += ord() - 96; } return $base_10; }
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Alpha base-26 to base-10...
by sauoq
in thread Alpha base-26 to base-10...
by eduardo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |