#!/usr/bin/perl use strict; ## writen by overload ## email overload@pcquestios.net &main; sub main{ while(){ my $what=''; print"(R)ot13 (B)ackwards (T)wist (Q)uit\n"; print"What will it be: "; chomp($what = ); if($what ne "R" && $what ne "B" && $what ne "T" && $what ne "Q"){ print"Not a choice\n"; redo; } if($what eq "B"){ &back; } if($what eq "R"){ &rot; } if($what eq "T"){ &twist; } if($what eq "Q"){ print"Good bye\n"; exit; } sub back{ print"Type letmeout to quit\n"; while(){ my $line=''; my $newline=''; print"Reverse a line: "; chomp($line = ); if($line eq "letmeout"){ print"Bye\n"; &main; } my $newline = reverse("$line"); print"$newline\n"; } } sub rot{ print"Type letmeout to quit\n"; while(){ my $line=''; print"Rot13: "; chomp($line = ); if($line eq "letmeout"){ print"Bye\n"; &main; } $line =~ tr /a-zA-Z/n-za-mN-ZA-M/; print"$line\n"; } } sub twist{ print"Twist uses Rot13 the reverse's it\n"; print"Type letmeout to quit\n"; while(){ my $line=''; my $newline=''; print"Twist: "; chomp($line = ); if($line eq "letmeout"){ print"Bye\n"; &main; } $line =~ tr /a-zA-Z/n-za-mN-ZA-M/; my $newline = reverse("$line"); print ("$newline\n"); } } } }