my $text; my $type; # This section grabs the text from the user and converts to lower case +. print "Please enter the text you would like to encrypt:"; chomp($text = <STDIN>); $text =~ tr/A-Z/a-z/; # This section lets you pick the type of encryption you would like to +use. print "Please enter c for Caesar or r for ROT13 encryption: "; chomp($type = <STDIN>); $type =~ tr/A-Z/a-z/; # This section uses the encryption you chose. if ($type eq c) { $text =~ tr/c-za-b/a-z/; } if ($type eq r) { $text =~ tr/n-za-m/a-z/; } print $text;
In reply to Cheesy Encryption by ergowolf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |