CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: General Discussions: Tutorial/Article Suggestions for The Learning Cent:
How to set Perl Interpreter within perl script



Apr 2, 2007, 7:45 AM

Post #1 of 2 (55189 views)
How to set Perl Interpreter within perl script Can't Post

 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

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.



Jul 14, 2008, 11:44 AM

Post #2 of 2 (54411 views)
Re: [SmallWonder] How to set Perl Interpreter within perl script [In reply to] Can't Post

Hi manish,

In perl, we have a %ENV Hash variable , which is used to set the environment variables.

while(($k,$v) = each(%ENV)) {

print "$k \t";

print $ENV{$k},"\n";


The above prints all the environments variable and thier values.

If u want to modify particular one then make a if condition and perform your code.




Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives