#!/usr/bin/perl
use LWP::Simple;
$apiKey = ""; #PUT YOUR API KEY HERE

$file = get "http://ws.audioscrobbler.com/2.0/?method=artist.getevents&artist=Cake&api_key=$apiKey";

@lines = split(/\n/,$file);
foreach $line (@lines) {
   if ($line =~ /<title>(.*)<\/title>/) {
    print "\n\n$1\n";
   }
   if ($line =~/<name>(.*)<\/name>/) {
    print "\t$1\n";
   }
   if ($line =~ /<street>(.*)<\/street>/) {
    print "\t$1\n";
   }
   if ($line =~ /<city>(.*)<\/city>/) {
    print "\t$1";
   }
   if ($line =~ /<postalcode>(.*)<\/postalcode>/) {
    print "\t$1";
   }
   if ($line =~ /<country>(.*)<\/country>/) {
    print "\t$1\n";
   }
}

