### Re: Golf: ROT-n

by dragonchild (Archbishop)
 on Nov 09, 2004 at 16:46 UTC ( #406386=note: print w/replies, xml ) Need Help??

 ```# 1 2 3 4 5 # 3456789 123456789 123456789 123456789 123456789 1234567890 \$n=shift;print chr((\$n-97+ord)%26+97)for split//,pop [download]```
52 strokes

Update:
 ```# 1 2 3 4 5 # 3456789 123456789 123456789 123456789 123456789 1234567890 print chr 97+(\$ARGV[0]-97+ord)%26for pop=~/./g [download]```
46 strokes

Update:
 ```# 1 2 3 4 5 # 3456789 123456789 123456789 123456789 123456789 1234567890 print chr 97+(\$ARGV[0]+7+ord)%26for pop=~/./g [download]```
45 strokes, thanks to cLive_;-)

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Replies are listed 'Best First'.
Re^2: Golf: ROT-n
by cLive ;-) (Prior) on Nov 09, 2004 at 20:07 UTC
Ah, but -97%26 == 7%26 - so there's another character ;-)

cLive ;-)

What do you mean?

Update: Duh! :-)

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Create A New User
Node Status?
node history
Node Type: note [id://406386]
help
Chatterbox?
 [1nickt]: Ah, I see. I did read some gamer mag reviews, and yes, they lamented the fact that laptops with no discrete video card are sold as "gaming" hardware. [1nickt]: But, they do have red keyboard backlighting! And gargoyles on the front, or words like "Maxxx" here and there. They know their demographic! [1nickt]: True gamers don;t buy Dells, HPs, or Lenovos, I think ;-) [ambrus]: The keyboard I bought doesn't have backlighting. I specifically had to select for that, because so many keyboards these days have lights. Why would I want lights in the keyboard? I want lights in the room, such as on the ceiling, not in the keyboard. choroba has a small USB lamp [ww]: ++ all (phony labels re "gaming"

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (11)
As of 2017-03-27 13:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
Should Pluto Get Its Planethood Back?

Results (320 votes). Check out past polls.