So you need to use a proxy ($foo) to be able to reach the internet because of your firewall? If that's the case, just supply HTTP::Proxy with a LWP::UserAgent object configured to use $foo.
Thats correct, because of firewall I added
$agent->proxy('http', "real-proxy");
I did tried with above line uncommented but it does't work, I mean doesn't connect to internet.
thanks
Vinay