Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 cooling their heels in the Monastery: (4)
As of 2014-11-23 04:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (128 votes), past polls