in reply to expect.pm

Why are you calling htpasswd, when you could be managing the files directly with Perl? See HTTPD::User::Manage in the CPAN.

-- Randal L. Schwartz, Perl hacker