in reply to Re: Alpha base-26 to base-10...
in thread Alpha base-26 to base-10...
Did you say "golf"? :-)
1 2 123456789012345678901234567 sub b262b10{ my$n;$n++for"a"..lc$_[0];$n }
27
Update: Make that 26. I can save a stroke by reusing @_. :-)
sub b262b10{ $_[1]++for"a"..lc$_[0];pop }
-sauoq "My two cents aren't worth a dime.";
In Section
Seekers of Perl Wisdom