Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Rot13 Challenge

by Anonymous Monk
on Dec 06, 2012 at 10:53 UTC ( #1007531=note: print w/ replies, xml ) Need Help??


in reply to Re: Rot13 Challenge
in thread Rot13 Challenge

my $input; print "Please Enter String to be encrypted or decrypted"; $input = <>; chomp $input; my @asciich; while($input=~ m/(.)/g) {push @asciich,ord ($1);} my $count=scalar(@asciich); print "Ascii values -----> @asciich\n"; for(my $i=0;$i<$count;$i++) { if (($asciich[$i] >= 65 && $asciich[$i] <= 77)|| ($asciich[$i] >= 97 & +& $asciich[$i] <= 109)) { $asciich[$i] = $asciich[$i]+13; } else {$asciich[$i] = $asciich[$i] - 13;} } print "Encrypted values -----> @asciich\n"; foreach(my $i=0;$i<$count;$i++) { $asciich[$i]=chr($asciich[$i]);} print "encrypted output ------> @asciich\t";


Comment on Re^2: Rot13 Challenge
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2014-09-02 00:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (18 votes), past polls