im totally new to perl (started in it as of yesterday). and i started learning for this specific project (though i will definitely use it alot from now on.) i wrote this post already before, but comp crashed browser when i submitted. so anyways. this code should load RS links from a file and load cookies from another file, then use them both to download from the file hosting site Rapidshare (as a premium user, hence cookies). the code is horrid i know, and totally non-functioning. i was hoping anyone who replies would help with any tidbits, examples and fixes would be loved.
Also, i wrote this using backticks and wget, i can't get LWP to work on RS's cgi login page, if anyone knows how, i'd be beyond grateful. thanks.
#!/usr/bin/perl -w use strict; my $localvar = $ARGV[0]; open(FILE, "$localvar") or die "Failed to openfile: $!"; while(<FILE>){ if($_ =~ m/^http/) { my $wgetarg = '-q -c --load-cookies /home/Locke/.cookies/rapidshar +e'; my @wget = `wget $wgetarg $_`; foreach(@wget) { print 'Done with this file\n'; } } }

In reply to Rapidshare and LWP by Gundumfx

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.