in reply to calling CGI script from outside server

You can use WWW::Mechanize module.
use strict; use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $mech->get('http://www.perlmonks.org/'); print $mech->content();