in reply to Convert shell to perl

Pretty Good Privacy (PGP) is "is a computer program that provides cryptographic privacy and authentication". You're using the -e option which probably stands for encrypt. GNU Privacy Guard (GPG or GnuPG) is a is free replacement for Pretty Good Privacy. You can use that too.

Type man pgp on the command line to see the documentation of the version installed on your system. Then read man chown and man chmod until you understand what the commands do. Unless you fully understand them there no point in trying to convert it.

There are several modules on CPAN that interfaces with PGP.

--
Andreas