or download this
# Checking User Credentials
print header(-status=>'401 Unauthorized', 'WWW-Authenticate'=>'Basic r
+ealm="!!! Special Private Area !!!"') unless $ENV{REMOTE_USER};
...
# Restricted code - this code will not run unless user is authenticate
+d. Test $ENV{REMOTE_USER} for user-level control
print header( -charset=>'iso-8859-7' );