#!/usr/bin/perl -w use strict; use XML::Twig; # to get the entries use YAML; # to dump the data # $entries is a reference to an array of entries # each entry contains { title => , content => } my $entries=[]; my $twig = XML::Twig->new( twig_handlers => { entry => sub { store_entry( $entries, @_); } } ) ->parseurl( "http://www.frequencyyouth.blogspot.com/atom.xml"); print Dump( $entries); exit; sub store_entry { my( $entries, $twig, $entry)= @_; push @$entries, { title => $entry->field( 'title'), content => $entry->first_child( 'content')->xml_string }; }