Created
May 6, 2013 10:18
-
-
Save SebDeclercq/5524335 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 -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