Did you read the WWW::Mechanize docs? A simple perusal gives a few obvious choices, plus, if the files are small enough to fit in memory, you can just $m_>get($link->url) and then save the $m->content to a file of your choosing.

There are many other options as well where you can get lower level and be able to deal with the file in chunks as it comes in, or save directly to disk, with other HTTP client modules on CPAN.

You can then get even more advanced and try to pull down multiple files in parallel, either inside a single thread (using event clients, such as POE or AnyEvent) or multi-threaded (using threads and queues). And then, more advanced, is to ensure you're only downloading some files at a time - because if you download too many it'll go slower than if you download only a few at a time. At least on most home internet connections.

Best of luck!


In reply to Re: Trying to download video from URL links by Tanktalus
in thread Trying to download video from URL links by soulrain

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.