Skip to content

Instantly share code, notes, and snippets.

@SebDeclercq
Created May 6, 2013 10:18
Show Gist options
  • Save SebDeclercq/5524335 to your computer and use it in GitHub Desktop.
Save SebDeclercq/5524335 to your computer and use it in GitHub Desktop.
#! /usr/bin/perl -w
use strict;
use warnings;
use feature 'say';
use LWP::Simple;
my @page = get('http://www.rtbf.be/classic21/conducteur');
my ( $song, $singer );
for (@page) {
$song = $1 if /<h4>Titre: <strong>([^<]*)<\/strong><\/h4>/i;
$singer = $1 if /<p>Artiste: <strong>([^<]*)<\/strong><\/p>/i;
}
say "Classic 21 (currently playing) :\n$singer –– $song";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment