use strict; use warnings; use LWP::Simple 'get'; use XML::Simple; use CPAN; my $xml = XMLin( get( 'http://perladvent.org/perladvent.rdf' ) ); my $item = shift @{ $xml->{channel}{item} }; CPAN::Shell->install($1) if $item->{title} =~ /-\s(\S+)$/;