View Single Post
Old 02-17-2006, 10:16 AM  
CHMOD
Confirmed User
 
CHMOD's Avatar
 
Join Date: Jun 2003
Posts: 1,697
Any Perl expert ?

I am running a script and I get an internal server error.
No diagnostic.

I know only very little of Perl language. I can't find out what the problem is here.

Anyone can tell me what is wrong with this script?

###########################################

#!/usr/bin/perl

use CGI::Carp qw(fatalsToBrowser);
use diagnostics;
use CGI;
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;

$q = CGI->new();
$ua = LWP::UserAgent->new();

$req = POST 'http://maxmind.com:8010/b',
[
l => "hgfjgfdhhh",
i => "69.70.92.38",
];


$k = new CGI($res->content());

$region = $k->param( region );
$city = $k->param( city );
$country = $k->param( country );

print "Content-type: text/html\n\n";
print "$region\n";
exit;

######################################

Thanks !
CHMOD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote