Greetings Monks:

I am interested inleading up to a reply to How do I make Net::FTP use wildcards and I have put together this script so far. It is meant to backup a diectory of images to a local file.

The following code produces the following output:
#! /usr/bin/perl #FTP to2600@darkphiber.ca for seCr33n CaPtu7e fetch # #Authored:/home/japh #% whoami #dReKurCe # #Tue May 31 19:17:51 EDT 2005 # # # use Net::FTP; $hostname='darkphiber.ca'; $username='to2600@darkphiber.ca'; $hack_the_planet='h4x0r5'; #update by OM Tue May 31 17:15:45 EDT 2005 $home='/home/neutrin0/2600'; $filename="neutrin0.to2600.3105a.jpg"; # open conection to ftp.darkphiber.ca $ftp=Net::FTP->new($hostname); $ftp->login($username,$hack_the_planet); print "Current Listing of $username"; @dirlisting=$ftp->ls(),"\n"; atomize(@dirlisting); #retrieve $filename and exit #not sure how the output of atomize should be utilized here $ftp->get($filename); $ftp->quit; sub atomize{ for $screencapture(@philes){print "output of ftp listing->$screencaptu +re\n"} }
output of ftp listing->neutrin0.to2600.3105a.png
output of ftp listing->neutrin0.to2600.3105b.png
output of ftp listing->neutrin0.to2600.3105c.png
output of ftp listing->neutrin0.to2600.3105d.png


How can i utilize the output of the method or (err sub routine) in atomize to get the image to my harddrive?


Thanks Monks
dReKurCe

In reply to Using NET::FTP to download Files by dReKurCe

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.