Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

to get env in perl

Status
Not open for further replies.

geffry

Programmer
Jun 26, 2002
33
US
I am using an apache server and run perl scripts placed cgi-bin. I have secured the site using .htaccess . my problem is. How do I get the user name which was authenticated by apache in the perl script ? (which the user tries to access.. )

Is the user name stored in the browser env, how do we output the value perl.

any help would be appreciated
 
To get all the environment variables and their values
Code:
foreach $key (keys %ENV) {
  print "$key=>$ENV{$key}\n";
}

HTH
--Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top