in reply to Sourcing cshrc environment in Perl

If all you want to do is add new stuff to %ENV from an external file, then there are basically three approaches:

1. Keep the settings as executable Perl statements in a .pl file that you can require on demand

2. Keep the settings in some other format. Parse that format from your script, adding to %ENV as you go.

3. exec a shell script that sources in whatever file it needs, then re-execs your Perl script (passing along some command-line option to note that the re-exec has been done once, and shouldn't proceed on indefinitely.)


Update: Did I say three? tilly adds a very good forth below.