Write a program in Perl that can do encryption and decryption of text. An example of encryption is that "a" becomes "z", and "b" becomes "y" and so on, or whatever shifting algorithm you can devise. The input file is any readable text file that is to be encrypted. When this input file is run against the encryption program, it encrypts the file with your encryption algorithm and saves the processed file to an encrypted file with same file name but with an extension of ".enc". When you run the decryption program, it reads the encrypted file and decrypts (or reverses) it and saves it to same filename but with an extension of ".dec" which stands for decrypted file.

For example:

The given input file is OriginalFile.txt
To run the encryption program: ./encryption.pl OriginalFile.txt
Its output will be: OriginalFile.enc
To run the decryption program: ./decryption.pl OriginalFile.enc
Its output will be: OriginalFile.dec

If you view the content of OriginalFile.enc, it is not understandable. If you view the content of the OrginalFile.dec, it should be the same as the OriginalFile.txt

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.