in reply to Re: Re: Re: Re: Alpha base-26 to base-10... (golf)
in thread Alpha base-26 to base-10...
To get it, try this:
while(<DATA>) { chomp; $erg = b262b10($_); # scalar context is important! print $erg, "\n"; } # equivalent to # sub b262b10{()=a..lc pop} # but with explaining output sub b262b10{@_=a..lc pop; print join " ", @_, "\n";@_} __DATA__ A Z AA AZ BA ZZ AAA ZBA __END__ # without the debug-output: 1 26 27 52 53 702 703 17629
regards,
tomte
Hlade's Law:
If you have a difficult task, give it to a lazy person --
they will find an easier way to do it.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Re: Re: Re: Alpha base-26 to base-10... (golf)
by John M. Dlugosz (Monsignor) on Jul 01, 2003 at 18:04 UTC | |
by Tomte (Priest) on Jul 01, 2003 at 18:17 UTC |
In Section
Seekers of Perl Wisdom