#!/usr/bin/perl -- use strict; use warnings; use CGI qw(); use CGI::Carp qw ( fatalsToBrowser ); use JSON::Parse 'parse_json'; use REST::Client; Main( @ARGV ); exit( 0 ); sub Main { my $client = REST::Client->new(); $client->setHost('http://localhost'); my $q = CGI->new(); my $adId = $q->param('adId'); print $q->header, $adId; }