Results 1 to 4 of 4
  1. #1
    ABW Ambassador CrazyGuy's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,463
    can anyone point me at a simple example script that uses the LWP module to transfer a file (both ways) via ftp?

    I'm ok with basic perl stuff - and I have a 10-line script that uses LWP to pull html down and print - but everything I see about LWP in man pages etc is way too complicated for me and my unfamiliarity with objects etc.

    I can hard code the ftp sites and the file to be transferred, so this really doesn't have to be fancy - I just need to be able to script it so it can run unattended along with other scripts.

    Thanks in advance ...

    Stewart Hutton | Are you Crazy?

  2. #2
    Newbie
    Join Date
    January 18th, 2005
    Posts
    2,694
    Try using Net::FTP instead of LWP.

    {

    "Laziness, Impatience, Hubris. Pick any three" ~ YAPC 19100

  3. #3
    ABW Ambassador CrazyGuy's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,463
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by eaglefire:
    Try using Net::FTP instead of LWP.
    <HR></BLOCKQUOTE>

    Thanks - that's helpful. I'm not sure the syntax will be any less impenetrable, but a quick search uncovered useful looking sample scripts that I'll be able to adapt - something I just couldn't find for LWP.

    Stewart Hutton | Are you Crazy?

  4. #4
    Newbie
    Join Date
    January 18th, 2005
    Posts
    2,694
    It seems I tried to do something similar using LWP a couple years ago and all the available information pointed to Net::FTP. That's also what's listed in the O'Reilly Perl Cookbook.

    The best - I mean really the best explanation of using objects in Perl is Damian Conway's book Object Oriented Perl. It's availabe in print and also by download. Damian is a great teacher - great lecturer as well and it's a book worth having. It's not at all complex; he starts with a enough of a review of the basics of Perl that novice can easily understand the latter parts.

    I also found this link with some LWP put and get examples:

    http://www.darkspell.com/references/lwpcook.html

    {

    "Laziness, Impatience, Hubris. Pick any three" ~ YAPC 19100

    [This message was edited by eaglefire on September 17, 2002 at 07:32 AM.]

  5. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. perl or php
    By awstewar in forum Programming / Datafeeds / Tools
    Replies: 20
    Last Post: August 25th, 2003, 04:32 PM
  2. decompile perl
    By awstewar in forum Programming / Datafeeds / Tools
    Replies: 8
    Last Post: August 1st, 2003, 09:23 PM
  3. Perl Help...
    By eggerda in forum Programming / Datafeeds / Tools
    Replies: 7
    Last Post: July 22nd, 2003, 05:40 AM
  4. Perl help.
    By mewmew in forum Programming / Datafeeds / Tools
    Replies: 2
    Last Post: October 10th, 2002, 03:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •