Using your original code, how about this modification?
if (uc($ARGV[1]) eq 'E') {
$_ = $ARGV[0];
tr/a-zA-Z/epstiwknuvgclrybxhmdofzqajEPSTIWKNUVGCLRYBXHMDOFZQAJ/;
}
else {
$_ = $ARGV[0];
tr/a-zA-Z/ypltavkrezgmshubxncdijfqowYPLTAVKREZGMSHUBXNCDIJFQOW/;
}
print;
This can translate to and from Al Bhed. The first argument is what you want translated, the second is how you want it translated (A for Al Bhed, E for English)
This perl albhed.pl "Translate Me" A results in "Dnyhcmyda Sa".
And perl albhed.pl "Dnyhcmyda Sa" E results in "Translate Me".
Sarah
Reach out and GREP someone. -- Seen on a license plate |