|
What am I doing wrong here? Here is my program:
#!/usr/bin/perl
use XML::Simple;
use LWP::Simple;
$xml = new XML::Simple;
my $web_source = get( "http://www.narberthusa.com/feeds/posts/default" );
$data = $xml->XMLin($web_source, forcearray => 1);
foreach $a (@{$data->{entry}}) {
print ++$c . "\n";
print "$a->{title}\n";
print $a->{author} . "\n";
print $a->{content} . "\n\n";
}
And here is what I get:
1
ARRAY(0x100a5e530)
ARRAY(0x100a5c4d0)
HASH(0x100a8ec80)
2
ARRAY(0x100a5c260)
ARRAY(0x100a5b0a0)
HASH(0x100a8c6d8)
3
ARRAY(0x100a5ae60)
ARRAY(0x100a5acc8)
HASH(0x100a8d2e8)
...and so forth. Why can I not access the true contents of these XML tags?
Thanks for any hints! |