| 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. | #!/usr/bin/perl
use LWP::Simple;
use XML::Simple;
use Term::ANSIColor;
$content = get('http://milw0rm.com/rss.php');
$xml = XMLin($content);
$num = scalar(@{$xml->{channel}->{item}});
for ($i=0; $i<$num; $i++){
print
colored("\nDate: $xml->{channel}->{item}->[$i]->{pubDate}\n", 'yellow'),
colored("\nTitle: $xml->{channel}->{item}->[$i]->{title}\n", 'green'),
colored("\nLink: $xml->{channel}->{item}->[$i]->{link}\n\n\n", 'green');
}; |