Making a gpg library

mskala@ansuz.sooke.bc.ca mskala@ansuz.sooke.bc.ca
Tue, 24 Oct 2000 21:38:04 -0700 (PDT)


On Tue, 24 Oct 2000, Michael Still wrote:

> A system call is perl is as inefficient (if not more) than the shell
> option you showed above. A system call has to: fork, exec the shell, and
> _then_ exec gpg.
Um, no. The "system" operator in Perl will only run the command through a shell, if it's used with a single string argument and that argument contains shell metacharacters - more or less, "only if necessary". This is documented on the "perlfunc" man page. (Oh, me naughty boy, man pages are deprecated by GNU!) If you use a little caution to avoid spawning an unnecessary shell, "system" should be no more expensive than a fork-and-exec in any other language. Matthew Skala mskala@ansuz.sooke.bc.ca :CVECAT DELENDA EST http://www.islandnet.com/~mskala/