Problem 2: skip Net::Gnutella, I doubt if your clients want their updates d1str1bu7ed to hundreds of kiddiez, nor do the kiddiez want your files. Be nice to both parties.

You certainly could do the pushing to multiple servers. But there's no point using pack, which isn't optimised for file compression. If you need to compress it further, you could tar.gz it (you probably want to unzip it first, the .tar.gz compression will prolly work better on an uncompressed initial file.)

You can do this from the command line (system 'tar zcvf filename files', system 'unzip filename') or using Archive::Tar and Archive::Zip. But note that the code to unzip the file needs to be on the other side. There's no way to do it remotely (without being rather insecure). So e.g., create a simple script to unzip the files, which runs on a crontab. (Make sure the script can't be fooled into unzipping things into bad places.)

You might find it easier to unzip first, then upload the raw files. After all, if it is automated, it doesn't matter if it takes longer.

The last bit, getting it to do it automatically, is the easiest.

while (<>) { chomp; # can't remember if this is necessary or not my $domain = $_; &send_file_to($domain) or warn "Couldn't send file to $_"; # your sub +routine }

dave hj~


In reply to Re: Seeking tutelage by dash2
in thread Seeking tutelage by Gnuser

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.