Welcome to the Monastery | |
PerlMonks |
Re: Printing output of perl cgi to a fileby NetWallah (Canon) |
on Apr 01, 2014 at 15:03 UTC ( [id://1080584]=note: print w/replies, xml ) | Need Help?? |
> I want to print the user name and the time of running the cgi script The "user name" of the person at the computer running the browser is not available by default, inside a server CGI program. If you need that, some sort of authentication or login process is required, that will capture ans store that information. Instead, you way want to use some easily available information, like the IP address of the client. CGI's remote_host() and remote_addr() are the best ways of getting that. You could try the remote_user() method, if you enable authentication. Your code: expects the user name to come in via a query string. It would be unusual if this was required to be sent with every page the user visited.
What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?
In Section
Seekers of Perl Wisdom
|
|