script working from shell, but not from browser.

[email protected] ("[email protected]") Fri, 18 Dec 2009 15:46:56 -0800 (PST)
Newsgroups perl.beginners.cgi
Organization http://groups.google.com
Message-ID <[email protected]>
so, i got some script with LWP and CGI using.
When run this script from shell - everything is ok, i got response
with data i need from the site.
But, when i run this script from browser i get error 500 -> "Can't
connect to www.something.com:80 (connect: Permission denied)".
I can`t understand how can it be... working from shell, but same
script not working from browser. Maybe there is some problem with
apache, but i can`t find it - the error_log is clean.

i try to search the Internet but find nothing to solve this problem,
so i decided to write here.