Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Keeping a local copy of a file up-to-date

by Jim (Curate)
on Sep 04, 2011 at 22:51 UTC ( #924128=note: print w/ replies, xml ) Need Help??


in reply to Re: Keeping a local copy of a file up-to-date
in thread Keeping a local copy of a file up-to-date

bontchev plainly asked:

My Perl script uses a local file as a database for some task. The master copy of this file is available on the Web. I would like to make sure that my local copy is up-to-date - i.e., matches the master copy. Is there a CPAN module for that sort of task - or do I have to re-invent the wheel?

How is information about a command-line utility relevant to Dr. Bontchev's inquiry about a CPAN module for use in his Perl script?


Comment on Re^2: Keeping a local copy of a file up-to-date
Re^3: Keeping a local copy of a file up-to-date
by BrowserUk (Pope) on Sep 04, 2011 at 22:56 UTC

    Because if you look inside that script, ignoring the command line options and help stuff, the whole script consists of two lines:

    use LWP::Simple qw( mirror ); $rc = mirror( $url, $file );

    'nuff said?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      But how is this responsive to Vesselin's question?

        The OP asked (note the added emphasis highlighting the bit that you so carefully omitted from your quote above!):

        Is there a CPAN module or something for that sort of task - or do I have to re-invent the wheel?

        lwp-mirror exactly answers that query including the bit about not having to reinvent the wheel.

        It means he doesn't have to write anything!. He can just use the existing script directly.

        What is there about an exactly appropriate answer that you do not understand?


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://924128]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2014-12-28 11:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (180 votes), past polls