You need to read more about CGI.
CGI Environment variables
rfc3875 4.1.11. REMOTE_USER
In reply to Re: Altering data in STDIN by Anonymous Monk in thread Altering data in STDIN by ionsphere