S_Shrum has asked for the wisdom of the Perl Monks concerning the following question:
OK...more of a 'Is it possible to do this' sorta question:
my %required = ( path => if ( $env{'HTTP_HOST'} = 'www.shrum.net' ) { "g:/websites/ +shrum.net/" || "d:/users/http/html/"; }, );
I know that the above won't work but you get the idea.
Is it possible to set up a conditional eval like this or do I need to do this outside the hash declaration?
On the other hand...is there a better way of dealing with pathnames...my code originally was written for Apache but IIS doesn't use environment variables like DOCUMENT_ROOT and so forth.
TIA
======================
Sean Shrum
http://www.shrum.net
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How do I...Conditional hash value
by myocom (Deacon) on Jul 26, 2002 at 22:20 UTC | |
Re: How do I...Conditional hash value
by dws (Chancellor) on Jul 26, 2002 at 22:09 UTC | |
by Anonymous Monk on Oct 05, 2015 at 21:13 UTC |