Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Golf: ROT-n

by fruiture (Curate)
on Nov 09, 2004 at 16:48 UTC ( [id://406387]=note: print w/replies, xml ) Need Help??


in reply to Golf: ROT-n

I could make it to 37.

# 1 2 3 # 3456789 123456789 123456789 123456789 print map{chr$ARGV[0]+ord}split//,pop # sadly i could not come up with a split-less soution that # is short enough

Update: ROT is for ROTate, so this is not a solution to the problem. Working on it...

Update2: changed HTML to properly hide code

--
http://fruiture.de

Replies are listed 'Best First'.
Re^2: Golf: ROT-n
by fruiture (Curate) on Nov 09, 2004 at 17:15 UTC

    ok, solving the problem, 58, or 59 if the ambiguity warning disturbs you.

    # 1 2 3 4 5 # 3456789 123456789 123456789 123456789 123456789 123456789 print map{chr+(($_=$ARGV[0]+ord)>122?-26:0)+$_}split//,pop ; print map{chr((($_=$ARGV[0]+ord)>122?-26:0)+$_)}split//,pop ;

    update: changed hiding code here, too

    --
    http://fruiture.de
Re^2: Golf: ROT-n
by hardburn (Abbot) on Nov 09, 2004 at 16:51 UTC

    You got hit by the same bug I did. See dragonchild's first response.

    "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://406387]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-19 14:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found