Hi could anybody help me with using geonames webservice in perl. im really new to this area and really could not find much help in implementing a client for REST on PERL. any help is appreciated.
An Article on the O'Reilly Network about consuming a Yahoo REST web service should help to get you started. The article desribes how to make a request and how to parse the xml :
# Make the request
my $yahoo_response = get($req_url);
# Parse the XML
my $xmlsimple = XML::Simple->new();
my $yahoo_xml = $xmlsimple->XMLin($yahoo_response);
The article does not cover url encoding. If you use one of the geonames services whith a placename as parameter you have to url encode the placename before constructing the final url:
use URI::Escape;
$escapedParameter = uri_escape("new york");