Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Caesar Shift

by tachyon (Chancellor)
on Aug 25, 2004 at 10:47 UTC ( #385640=note: print w/ replies, xml ) Need Help??


in reply to Caesar Shift

You can do it much more simply and without the arrays or the eval. Just rotate by 1 x 26 times and you are back to the start ie:

$_ = "Hello\n"; for my $i(1..26){ tr/a-zA-Z/b-zaB-ZA/; print; }

cheers

tachyon


Comment on Re: Caesar Shift
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (15)
As of 2014-10-21 14:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (105 votes), past polls