Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://385640]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2016-12-08 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (148 votes). Check out past polls.