http://www.perlmonks.org?node_id=330491


in reply to Login form to enable access to htaccess area?

From the LWP::UserAgent docs:
$ua->credentials( $netloc, $realm, $uname, $pass )
Set the user name and password to be used for a realm. It is often more useful to specialize the get_basic_credentials() method instead.
I've not tried this, but LWP certainly supports it.