http://www.perlmonks.org?node_id=1052697

varalaxmibbnl has asked for the wisdom of the Perl Monks concerning the following question:

if i run this code i get (Can't locate JSON.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at map.pl line 3. BEGIN failed--compilation aborted at map.pl line 3.) this error.... i don't understand what is the problem in this plz help me out for this

use strict; use LWP::Simple; # from CPAN use JSON qw( decode_json ); # from CPAN sub getLatLong($){ my ($address) = @_; my $format = "json"; #can also to 'xml' my $geocodeapi = "https://maps.googleapis.com/maps/api/geocode/"; my $url = $geocodeapi . $format . "?sensor=false&address=" . $addres +s; my $json = get($url); my $d_json = decode_json( $json ); my $lat = $d_json->{results}->[0]->{geometry}->{location}->{lat}; my $lng = $d_json->{results}->[0]->{geometry}->{location}->{lng}; return ($lat, $lng); }