2009/1/8 Tony Kirkham <[email protected]>:
> Is there a better way to do this in Perl?

Maybe like this:

#!/usr/bin/perl
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;

my $response = 
$ua->get('http://kannel:8801/cgi-bin/sendsms?username=foo&password=bar&from=123&to=666666666&text=Hurt+me+plenty');

if ($response->is_success) {
        print $response->content;  # or whatever
} else {
        print $response->status_line;
}


Regards,

-- 
Marcin Boćkowski
http://www.ktosiu.com

Reply via email to