or download this
print header(-status=>'401 Unauthorized', 'WWW-Authenticate'=>'Basic r
+ealm="Restricted Games"') unless $ENV{REMOTE_USER};
exit unless $ENV{REMOTE_USER};
#Restricted code - this code will not run unless user is authenticated
+. Test $ENV{REMOTE_USER} for user-level control
print header(), "Authenticated User: $ENV{REMOTE_USER}\n";