|Just another Perl shrine|
perl Expect; "set home"by Stoomy (Novice)
|on May 18, 2011 at 16:14 UTC||Need Help??|
Stoomy has asked for the
wisdom of the Perl Monks concerning the following question:
I'm trying to use Expect.pm to import a bunch of PGP keys into GPG.
I think I've got most every thing working except I'm not able to set the home dir. The result is the import tries to create /root/.gnupg...which fails due to perms (as it should).
If I were doing this manually, it would look something like this:
Here is the relevant bit of code:
I'm not sure if doing sudo is the right approach or not....any suggestions much appreciated.