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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

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

 



SmallWonder
Novice

Apr 2, 2007, 7:45 AM

Post #1 of 2 (35346 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
#!/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


hydpm
User

Jul 14, 2008, 11:44 AM

Post #2 of 2 (34568 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.



Thanks

Raj

 
 


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

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