Help for this page

Select Code to Download


  1. or download this
    # 1 (57 characters)
    $a+=($_-($_|0?0:55))*36**$b++while$_=chop$ARGV[0];print$a
    
    # 2 (63 characters)
    print[map$a+=($_-($_|0?0:55))*36**$b++,reverse pop=~/./g]->[-1]
    
  2. or download this
    # 1 (still 57 characters, with props to petral for the idea)
    $a+=(-55+/\d/*7+ord)*36**$b++while$_=chop$ARGV[0];print$a
    
    # 2 (now 64 characters, with props to blakem for the idea)
    print[map$a+=(/\d/?$_:-55+ord)*36**$b++,reverse pop=~/./g]->[-1]