![]() |
|
Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Perl & cron job environmental variablesby djp (Hermit) |
on Jul 03, 2007 at 03:33 UTC ( #624585=note: print w/replies, xml ) | Need Help?? |
You might like an explanation of what's happening here. By default, csh reads your .cshrc file, unless the -f switch is specified. That's why your environment is populated for the csh script but not for the Perl script.
It's good practice in csh scripts to specify '#!/bin/csh -f' on the shebang line, to prevent reading .cshrc. It's better practice to avoid csh scripts altogether, see http://www.faqs.org/faqs/unix-faq/shell/csh-whynot for details.
In Section
Seekers of Perl Wisdom
|
|