use Crypt::TEA; my $cipher = Crypt::TEA->new($userpassword); my $ftpcipher = $cipher->encrypt($ftppassword); print $cipher->decrypt($ftpcipher);