Hello,could some one please explain what is wrong with the following perl script from orion's prespective?
I appreciate your help!!!!
******************************************
#!/usr/bin/perl
use strict;
use warnings;
use LWP::Simple;
$|=1;
getstore('http://kannel1.us.spireon.com:13000/status', 'url.html') or die 'Unable to get page';
sub main {
my $file= 'url.html';
open(INPUT,$file) or die("input file $file not found.\n");
while (my $line= <INPUT>) {
# Uptime stats
if ($line=~ / uptime([^\n]*) /){
print "SMS uptime is: $1 \n";
}
# received Stats
if ($line=~ /SMS: received \b([\d]+)[\S ]*sent \b([\d]+) /){
print ('SMS recieved: ',"$1 \n", 'SMS Sent: ', "$2 \n");
}
}
close(INPUT);
}
main();