What’s the Perl equivalent for the following PHP calls?
$_SERVER["HTTP_HOST"]
$_SERVER["REQUEST_URI"]
Any help would be much appreciated.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Environment variables are a series of hidden values that the web server sends to every CGI you run. Your CGI can parse them and use the data they send. Environment variables are stored in a hash called %ENV.
For example,
$ENV{'HTTP_HOST'}will give the hostname of your server.For more details see CGI Environmental variables