[MalaWiki] [TitleIndex] [WordIndex]

PbSlidesLinux/520 LWPSimple

LWP::Simple

#!/usr/bin/perl -w
use LWP::Simple;

my $url = 'http://radio.autistici.org/';

my $content = get($url);
die "Couldn't get $url" unless defined $content;

# Do things with $content:
if ($content =~ m/bandita/i) {
    print "Radio Bandita is streaming!\n";
} else {
    print "No good music online.\n";
}


2014-06-11 14:17