in reply to New with WWW:Mechanize and Credentials issue

Try
$agent->get($URL); $agent->credentials("$host:80","$URL",$user,$pass);
Try with port 80 Or any specific port if mentioned(after $host)
$host can be something like http://yahoo.com or similar.
Raghu