in reply to Interfacing perl with .htaccess and .htpasswd files...

since perl runs as a normal user

Eh? Why are you doing that? perl ought to run as the same uid as the webserver runs under. Is your script setuid? You shouldn't be doing that.

Abigail