#!/usr/bin/perl -w use strict; use warnings; use JSON; my $URL_lat = 40.4936; my $URL_lon = -111.9388; my $info = `curl -sm 5 "https://forecast.weather.gov/MapClick.php?lat=$URL_lat&lon=$URL_lon&unit=0&lg=english&FcstType=json"` or die "Error"; my $json = decode_json $info or die "Error"; my $temp = %{$json}{"currentobservation"}->{"Temp"}; my $windS = %{$json}{"currentobservation"}->{"Winds"}; my $windD = %{$json}{"currentobservation"}->{"Windd"}; my $desc = %{$json}{"currentobservation"}->{"Weather"}; print $desc.":".$temp.":".$windS.":".$windD;