When you shell out of Perl, the environment is set using the %ENV hash. You can alter this hash within your script, and then each shell call will use your altered %ENV. When the script ends, the environment will revert to whatever it was before your script. (unless you edit it some other way.)
So instead of calling your init routine, write it into your perl script.
Well noted! Same as CGI... Those who use the Oracle DBD driver have found that it won't fly unless you set the Oracle ENVs correctly. A common example of this is printing out the %ENV hash on test.pl's:
I think the problem is that system will create a sub-shell therefore any environment variables defined will be out of scope to the calling process, what you really want is a perl version of the C function 'putenv'(btrott and chromatic will make me a liar by saying one exists already :-) Adding to the ENV hash seems the best way to go.