While not new to Perl, I have spent more time on databases and Java and decided to try using Perl to download podcast info. I really like Perl, but it takes a little more effort to get things going with it.

I want to download a large collection of podcasts which I have catalogued in a database. I downloaded the complete rss and catalogued the shows. Some of which I downloaded manually with wget

I read in a previous post on here about someone using system(wget .....) in perl, but a follow-up post suggested LWP

I'm not really getting in the LWP documentation how to do this. I'll read it again a little more closely, but if I need to spend 5 hours reading LWP, to get 30 or so files it's not an economical trade of time. It's easier to use system(wget -O...). However, if LWP is great, this would be my entry point to eventually become more fluent with it.

Would anyone be willing to show me example code using LWP to download podcasts from an array (of selected choices), to a specific directory, with a specific name for each file? I think that would help me get a better grip on LWP's usefulness over wget in a perl script

I have just about every other element of my automation done. This would be the last step.

Thanks for your time


In reply to Using LWP instead of wget? by kingram

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.