Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

GotToBTru's scratchpad

by GotToBTru (Chaplain)
on Jun 15, 2010 at 13:25 UTC ( #844863=scratchpad: print w/ replies, xml ) Need Help??

use strict; use warnings; my $plaintext = 'We are discovered. Flee at once!'; my $key = 'CorrectBatteryHorseStaple'; print "Original message: $plaintext\n"; my $ciphertext = cypher($plaintext,$key); my $represent = $ciphertext; $represent =~ tr/[A-Za-z0-9] /*/c; print " Encoded message: $represent (* indicates non-alphabet characte +r)\n"; my $decoded = cypher($ciphertext,$key); print " Decoded message: $decoded\n"; sub cypher { my $plain = shift; my $key = shift; my $i=0; $key x= ( 1 + length($plain)/length($key) ); return join '', map {$_ ^ substr($key,$i++,1)} (split '',$plain); }
DatePointsPostsRankETA Next RankNext Rank
2010061500InitiateN/AN/A
201407211794154HermitN/AChaplain (1800)
201407231806154Chaplain20141030Deacon(2400)
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2014-07-24 08:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (158 votes), past polls