in reply to $ENV{HTTP}, environment variables, javascript, javascript.pm, setting for a current page
As for #2, the right way to set those environmental variables is to let the web server set them. If you're providing those only as an example of environmental variables you want to set, then, yes, that is the correct way to set them.
I don't entirely understand your question about the print statement. If you want to display what the *web server* set for the SERVER_NAME or SCRIPT_URI, then assigning them new values before you print them is guaranteed to clobber the original settings.
Another helpful tip -- using the -w and -T flags and the strict module is highly recommended when writing CGI scripts. It will save you much grief in the future.
|
|---|