Okay so I go it to work by doing it a little different than what you directed me to, but it works. So to give everyone what it looks like now, here is the code:
#!/usr/bin/perl # RSS CGI Prog use strict; use warnings; use CGI; use XML::RSS; use LWP::Simple; use Data::Dumper; my $cgi = CGI->new; my $url = "http://feeds.feedburner.com/animals"; my $content; my $rss = XML::RSS->new; if ($url=~ /http:/i) { $content = get($url); die "Could not retrieve $url" unless $content; $rss->parse($content); } print $cgi->header, $cgi->start_html(-style=>"/css/cgi_lesson1.css",-title=>"This is + an RSS thingy."); print_html($rss); sub print_html { my $rss = shift; print <<"HTML"; <div class="container"><div class="header"><B><center><h2><a href="$rs +s->{'channel'}->{'link'}">$rss->{'channel'}->{'title'}</a></h2></cent +er></B> HTML if ($rss->{'image'}->{'link'}) { print <<"HTML"; <center> <p><a href="$rss->{'image'}->{'link'}"><img src="$rss->{'image'}->{'ur +l'}" alt="$rss->{'image'}->{'title'}" border="0" HTML print qq{ width="$rss->{'image'}->{'width'}"} if $rss->{'image'}->{'width'}; print qq{ height="$rss->{'image'}->{'height'}"} if $rss->{'image'}->{'height'}; print "></a></center><p></div>\n"; } print qq{<div class="content">}; foreach my $item (@{$rss->{'items'}}) { next unless defined($item->{'title'}) && defined($item->{'link'}); print qq{<a href="$item->{'link'}">$item->{'title'}</a><BR>\n$item +->{'description'}}; } if ($rss->{'channel'}->{'copyright'}) { print <<"HTML"; </div> <div class="footer"><center><p><sub>$rss->{'channel'}->{'copyright'}</ +sub></p></center> HTML } print <<"HTML"; </div></div> HTML } print $cgi->end_html;

In reply to Re^4: Trying to get an RSS to display by Henglong
in thread Trying to get an RSS to display by Henglong

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.