Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 romping around the Monastery: (17)
As of 2014-09-30 14:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (372 votes), past polls