# Variables common to all scripts $webroot = $ENV{'DOCUMENT_ROOT'}; @directories = split (/\//, $webroot); # Find the name of the htpasswd file $htpasswddir = ""; for ( $i = 0 ; $i <= 5 ; $i++ ) { $htpasswddir = $htpasswddir . $directories[$i] . "/"; } $htpasswdfile = $htpasswddir . ".htpasswd"; $tmphtpasswdfile = $htpasswddir . ".htpasswd.tmp";