http://www.perlmonks.org?node_id=142787


in reply to The Perl Review

My first golf attempt (the base 36 question above).. any inspirational thoughts/comments?

$_="asd123"; print eval join"+",map{$_=(-54+ord uc);$_+=6if/-/;"$_*36**".$i++}rever +se split('');

Replies are listed 'Best First'.
Re: Re: The Perl Review
by blakem (Monsignor) on Feb 01, 2002 at 22:21 UTC
    Two quick comments. Your values are off by one 'A' => 11 instead of 10. Also split('') is shorter as /./g

    Other than that, I like it... eval entries are always cool.

    -Blake