#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    3
    Rep Power
    0

    Need Perl script to copy the files between one server to another remote servers.


    Hi,
    I Need Perl script to copy the files between one server to another remote servers.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Posts
    832
    Rep Power
    496
    And what have you done so far?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    3
    Rep Power
    0
    Originally Posted by Laurent_R
    And what have you done so far?
    I tyred to using the below script,it's not working:
    #!/usr/bin/perl

    use warnings;
    use strict;

    use Net::SCP qw( scp );

    my $file = "/home/steve/blah.txt";
    my $dest = "steve\@pearl.ibctech.ca:/web/site_dir";

    my $scp = new Net::SCP;
    $scp->scp($file, $destination);
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Posts
    832
    Rep Power
    496
    Does it work if you issue the SCP command from the Unix prompt?

IMN logo majestic logo threadwatch logo seochat tools logo