in reply to Proxy Authentication

I just tried your script using the first commented line ($ua->proxy) with the uri for our squid proxy at work. It worked perfect.

Can you provide more detail about the error you're getting?