#!/usr/bin/perl -w use strict; my $gpgpath = "/usr/bin/gpg"; my $gpguser = "xxxxxxxx\@xxxxxxxxx.com"; my $filenum = 'set_to_test_path'; $gpgcommand = "$gpgpath --batch --always-trust --eatr -a -r $gpguser -o tmpMessages/$filenum.enc -e"; print $gpgcommand, "\n"; my $gpgresults = `$gpgcommand`; print $gpgresults, "\n";