Okay, check for firewall rules if you're a gateway or at your gateway/router. Can you do ping, traceroute, ftp, etc.?
You didn't make it clear where the system was that you were trying to connect to, but slurping yahoo is probably not a good idea. I know they've blocked several UN!X services because of traffic issues. Try another simpler site before you assume that it's a problem.
Comment on Re^3: weird 500 Error after system reboot
Mysteriously, the problem has resolved itself after a week. No one knows how or why, including the sysadmin and the network people. And we cannot reproduce the problem. Oh well. All's well that end's well... I hope.