in reply to calling CGI script from outside server

LWP::Simple would be an easy choice:
perl -MLWP::Simple -we 'print get ("http://myserver/cgi-bin/temp.cgi") +;'