Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Rot13 Challenge

by Anonymous Monk
on Feb 10, 2011 at 01:51 UTC ( #887326=note: print w/replies, xml ) Need Help??

in reply to Rot13 Challenge

$ perl -pe'y/A-Za-z/N-ZA-Mn-za-m/' file

Replies are listed 'Best First'.
Re^2: Rot13 Challenge
by Anonymous Monk on Dec 06, 2012 at 10:53 UTC
    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";

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://887326]
LanX gets eaten by a black hole popping up in the vacuum of his head
[Eily]: that a black hole formed there would rather be the sign of a head too full
LanX can't hint anymore to zentaras video because he disappeared

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2017-06-23 16:28 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (552 votes). Check out past polls.