in reply to (jeffa) Re: need understanding
in thread need understanding

Sorry for the lack of information, but what I'm looking for is to pull set variables in my perl script. Like in KSH . .environment_file to prevent hard coding paths and passwords. Hope this gives more. Thanks.

Replies are listed 'Best First'.
Re: Re: (jeffa) Re: need understanding
by perrin (Chancellor) on Dec 01, 2001 at 00:21 UTC
    It sounds like you want a configuration file. There are tons of ways to do that in perl. Try searching for configuration or config, or check out some of the stuff on CPAN, like AppConfig.
Re: Re: (jeffa) Re: need understanding
by kwoff (Friar) on Dec 01, 2001 at 00:08 UTC
    You could login to the account with that initialization file then start your perl script and get with %ENV as shown above. I don't know if there's a generic shell-initialization-file parsing CPAN module. Or if it's like .bashrc, maybe look on equals signs like /PATH=['"]?(\w+)/, though that's not a good solution in my opinion.