I'm (finally) writing some error checking on a program. It
needs to find and make sure the user can run a few programs.
Now, md5 and mimencode (yes,
that program) are pretty
common, and they're most likely to already be in the user's
PATH, but openssl isn't. I'd like to add /usr/local/openssl/bin/
to the PATH, so that it can check in that place of last
resort before
dieing.
I've tried the following, none of which seemed to work:
(no, not all at the same time)
$ENV{PATH} = $ENV{PATH} . ":/usr/local/openssl/bin";
use lib qw(/usr/local/openssl/bin/);
push @INC, "/usr/local/openssl/bin/";
The next two lines are:
chomp($openssl = `which openssl`);
die "openssl required\n" unless (-X $openssl);
And it always
die's. These attempts are based
on reading the Blue Camel book, and
how to add path to
@INC. That node, however, is about adding a path for a
module, so I'm not sure if it's appropos.