Home: Fun With Perl: Perl Quizzes - Learn Perl the Fun Way:
How to set new perl interpreter within perl script



SmallWonder
Novice

Apr 2, 2007, 7:44 AM


Views: 50743
How to set new perl interpreter within perl script

Hello Friends

I am new to this forum and this is my first post.

I im in big trouble.

I have to set some environment variables within perl script. and
after that i have to set a new perl interpreter for further action.

in detail:

first start the script with general interpreter
#!/usr/bin/perl

then set some environment variables

after that set a new interpreter which will be used for rest of the code.


Friends can you please Help me on this problem.

Thanks in advance.

Manish


deepakvijayaraj
New User

Jul 29, 2009, 4:26 AM


Views: 48005
Re: [SmallWonder] How to set new perl interpreter within perl script

Manish,

You can use the %ENV for accessing the Environment variables.

Ex: $ENV{'PATH'}, will help you access the PATH Environment variable.

You can set the path of PATH variable to access the different perl interpreter,once you are done setting the other Environment variables.

Hope this helps.

Cheers

Deepak Vijayaraj