Using Net::FTP to get a file I almost know the name of

Discussion in 'Perl Misc' started by laredotornado@zipmail.com, Jan 25, 2005.

  1. Guest

    Hello, I am using Net::FTP and I was wondering how I can retrieve a
    file if I know three things

    1. The extension (e.g. ".txt")
    2. The directory in which the file will appear
    3. There will be at most one file in that directory with the given
    extension.

    How would i go about figuring out the full path to that file so that I
    can use the Net::FTP->get command?

    Thanks, - Dave
     
    , Jan 25, 2005
    #1
    1. Advertising

  2. Anno Siegel Guest

    <> wrote in comp.lang.perl.misc:
    > Hello, I am using Net::FTP and I was wondering how I can retrieve a
    > file if I know three things
    >
    > 1. The extension (e.g. ".txt")
    > 2. The directory in which the file will appear
    > 3. There will be at most one file in that directory with the given
    > extension.
    >
    > How would i go about figuring out the full path to that file so that I
    > can use the Net::FTP->get command?


    You read the documentation of the module you're using. Take special
    note of the ->ls and ->dir methods. Use pattern matching to recognize
    the file you want.

    Anno
     
    Anno Siegel, Jan 25, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mufasa
    Replies:
    4
    Views:
    334
    Mufasa
    May 1, 2007
  2. RG
    Replies:
    0
    Views:
    447
  3. Jeff Miller
    Replies:
    0
    Views:
    505
    Jeff Miller
    Mar 26, 2009
  4. Andries

    I know, I know, I don't know

    Andries, Apr 23, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    240
    Gregory Toomey
    Apr 23, 2004
  5. D. Buck
    Replies:
    2
    Views:
    497
    D. Buck
    Jun 29, 2004
Loading...

Share This Page