PERL script not seeing env vars when run by cron
I have a perl script that works fine when I run it from the command line, but now that I'm running it (as root) from cron, it isn't picking up my environment variables.
my $host = $ENV{HOST}
print "Host = $host\n";
when run from cron it results in
"Host ="
but when I run it from the shell,
"Host = myhostname"
|