FAQ
Ok so the boss wants me to create two scripts in perl and I don't even
know where to begin.



One is to copy a log file to a backup server every hour.



And the second is to restore the backup from one server from the
previous night to the backup server every morning.



Any ideas on where to start would be greatly appreciated.



Thanks

Rick

Search Discussions

  • Ricky Zhou at Jun 27, 2007 at 10:03 pm

    Rick wrote:
    Ok so the boss wants me to create two scripts in perl and I don't even
    know where to begin.



    One is to copy a log file to a backup server every hour.



    And the second is to restore the backup from one server from the
    previous night to the backup server every morning.



    Any ideas on where to start would be greatly appreciated.
    To be honest, this really sounds like the jobs for a cronjob and a shell
    script, at most. Are you sure that you even need Perl for this?

    Hope this helps,
    Ricky
  • Chas Owens at Jun 27, 2007 at 10:07 pm

    On 6/27/07, Rick wrote:
    Ok so the boss wants me to create two scripts in perl and I don't even
    know where to begin.

    One is to copy a log file to a backup server every hour.

    And the second is to restore the backup from one server from the
    previous night to the backup server every morning.

    Any ideas on where to start would be greatly appreciated.
    snip

    A lot depends on your knowledge of Perl. Given that you have no idea
    where to begin I assume you know nothing. Run out and buy Learning
    Perl. Read the first few chapters and then take a look at Net::FTP*
    or Net::SCP*. If you still have questions how things work then post
    them with the code you are trying to make work to the list.

    * http://search.cpan.org/~gbarr/libnet-1.21/Net/FTP.pm
    * http://search.cpan.org/~ivan/Net-SCP-0.07/SCP.pm
  • Chas Owens at Jun 27, 2007 at 10:11 pm

    On 6/27/07, Chas Owens wrote:
    On 6/27/07, Rick wrote:
    Ok so the boss wants me to create two scripts in perl and I don't even
    know where to begin.

    One is to copy a log file to a backup server every hour.

    And the second is to restore the backup from one server from the
    previous night to the backup server every morning.

    Any ideas on where to start would be greatly appreciated.
    snip

    A lot depends on your knowledge of Perl. Given that you have no idea
    where to begin I assume you know nothing. Run out and buy Learning
    Perl. Read the first few chapters and then take a look at Net::FTP*
    or Net::SCP*. If you still have questions how things work then post
    them with the code you are trying to make work to the list.

    * http://search.cpan.org/~gbarr/libnet-1.21/Net/FTP.pm
    * http://search.cpan.org/~ivan/Net-SCP-0.07/SCP.pm

    Specifically chapters 2 Scalar Data, 4 Subroutines, 6 I/O Basics, and
    11 Filehandles and File Tests.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupbeginners @
categoriesperl
postedJun 27, '07 at 7:02p
activeJun 27, '07 at 10:11p
posts4
users3
websiteperl.org

3 users in discussion

Chas Owens: 2 posts Ricky Zhou: 1 post Rick: 1 post

People

Translate

site design / logo © 2022 Grokbase