Jump to content


Photo

PERL version of get_env( )


  • Please log in to reply
2 replies to this topic

#1 benjam

benjam
  • Members
  • PipPipPip
  • Advanced Member
  • 43 posts
  • LocationSalt Lake City, UT

Posted 05 September 2006 - 09:42 PM

I have a line in my httpd.conf file like the following:


 Setenv CONFIG_STAGE DEVL



and in my config.php file I have a line like the following:


 $CONFIG_STAGE = get_env('CONFIG_STAGE');



How might I do the same thing in PERL?

And I know this is a PHP forum, but I figured there has to be a few people in here who know both.
Windows 7
MySQL: 5.1.36-community
PHP: 5.3.2 VC9
Apache 2.2 (apachelounge VC9)

#2 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 05 September 2006 - 09:46 PM

Try this:

my $CONFIG_STAGE = $ENV{'CONFIG_STAGE'};

Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#3 benjam

benjam
  • Members
  • PipPipPip
  • Advanced Member
  • 43 posts
  • LocationSalt Lake City, UT

Posted 05 September 2006 - 09:53 PM

Thanks, I'll try that.

And thanks for moving the post to the correct area... my bad.
Windows 7
MySQL: 5.1.36-community
PHP: 5.3.2 VC9
Apache 2.2 (apachelounge VC9)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users