-
-
Save VR2ZDX/9837cd25313f5265565199eca1da3201 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use LWP::Simple; | |
# Variables for temperature, humidity, wind direction, speed, gust and pressure | |
my $temperature; | |
my $humidity; | |
my $winddirection; | |
my $windspeed; | |
my $windgust; | |
my $pressure; | |
# RegEx match count | |
my $count; | |
# Convert month into 2 digit format | |
my $month = sprintf("%02d", ((localtime)[4] + 1) % 100); | |
# Convert day into 2 digit format | |
my $day = sprintf("%02d", (localtime)[3] % 100); | |
# Convert hour into 2 digit format | |
my $hour = sprintf("%02d", (localtime)[2] % 100); | |
# Convert minute into 2 digit format | |
my $minute = sprintf("%02d", (localtime)[1] % 100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment