Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
/usr/bin/csh -c printenv
Produces the correct set of environmental variables.
However, the Perl script "cron" job:
/home/username/bin/perlprintenv.pl
where the code is simply:
produces a much shorter list of variables and a shorter path. I am running Solaris.#!/usr/local/perl -w foreach $c (keys %ENV) { print "$c \t".$ENV{$c}."\n"; }
Is there any easy way to force cron to export all variables?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Perl & cron job environmental variables
by Fletch (Bishop) on Jul 02, 2007 at 20:26 UTC | |
Re: Perl & cron job environmental variables
by toolic (Bishop) on Jul 02, 2007 at 20:49 UTC | |
Re: Perl & cron job environmental variables
by dorko (Prior) on Jul 02, 2007 at 20:29 UTC | |
Re: Perl & cron job environmental variables
by djp (Hermit) on Jul 03, 2007 at 03:33 UTC | |
Re: Perl & cron job environmental variables
by Anonymous Monk on Jul 03, 2007 at 01:29 UTC | |
Re: Perl & cron job environmental variables
by Anonymous Monk on Jul 02, 2007 at 20:20 UTC |