FAQ
Does anyone know how to use the file copy module to past files to remote
servers?

i.e.

server 1:x
server 2:y

I want to copy the file named foobar from x to y. Can this be done?



William Black



_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

Search Discussions

  • David at Sep 23, 2002 at 7:05 pm

    William Black wrote:

    Does anyone know how to use the file copy module to past files to remote
    servers?

    i.e.

    server 1:x
    server 2:y
    if your os is unix/linux. try if you have scp like:

    scp <server 1>:from_file <server 2>:to_file

    Windos might have something similar

    david
  • Michael Fowler at Sep 23, 2002 at 7:43 pm

    On Mon, Sep 23, 2002 at 09:31:25AM -0400, William Black wrote:
    Does anyone know how to use the file copy module to past files to remote
    servers?
    File::Copy is for copying and moving files on the local filesystem. I'm not
    sure why you would be trying to apply it to this problem, or why you'd be
    asking us how to apply it to this problem.

    You'll want some file transfer protocol, and both ends need to support it.
    For example, if the remote end has an FTP server, you can use Net::FTP to
    send the file. There are other protocols, so you should look to see what
    your servers support.


    Michael.
    --
    Administrator www.shoebox.net
    Programmer, System Administrator www.gallanttech.com
    --
  • Timothy Johnson at Sep 23, 2002 at 8:45 pm
    If you're using Win32 systems then you just have to make sure that you have
    a writeable share on the target system. If you can't get it to copy as the
    second name, then you can always just copy and then rename the file.

    -----Original Message-----
    From: david
    Sent: Monday, September 23, 2002 11:45 AM
    To: beginners@perl.org
    Subject: re: FILE COPY


    William Black wrote:
    Does anyone know how to use the file copy module to past files to remote
    servers?

    i.e.

    server 1:x
    server 2:y
    if your os is unix/linux. try if you have scp like:

    scp <server 1>:from_file <server 2>:to_file

    Windos might have something similar

    david

    --
    To unsubscribe, e-mail: beginners-unsubscribe@perl.org
    For additional commands, e-mail: beginners-help@perl.org
  • Darren Edgerton at Sep 23, 2002 at 10:13 pm
    Hi All,

    i have:-
    Perl 5.6.1
    AIX 4.3.3
    DBI-1.30
    DBD::ODBC-0.43


    ---- very simple DBI script ----
    #!/usr/local/bin/perl

    use DBI;
    use DBD::ODBC;

    my $dbh = DBI->connect('dbi:ODBC:raider','myuserid','mypasswd');
    $dbh->disconnect();
    ---------------------------------

    when i run this script it exits with error message:
    "Illegal Instruction(coredump)"

    this is occuring AFTER the disconnect statement
    i can in fact query the database, return rows etc no problem - but then it
    dumps
    core at the end of the script


    if i try to debug the corefile, i get .....

    [root@redbrick] /tmp>dbx /usr/local/bin/perl
    Type 'help' for help.
    reading symbolic information ...
    [using memory image in core]

    Illegal instruction (reserved addressing fault) in . at 0x0 ($t1)
    0x00000000 000a4c43 Invalid opcode.
    (dbx) where
    warning: could not locate trace table from starting address 0x0
    DynaLoader.() at 0x2001c918
    exit(??) at 0xd01779a0
    main() at 0x10001054
    (dbx) q
    [root@redbrick] /tmp>


    looks like a NULL pointer relating to the DynaLoader.


    so if i turn on DL Debugging ( export PERL_DL_DEBUG=1 ), i get:

    DynaLoader.pm loaded (/usr/local/lib/perl5/5.6.1/aix
    /usr/local/lib/perl5/5.6.1 /usr/local/lib/perl5/site_perl/5.6.1/aix
    /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl .,
    /usr/local/lib /lib /usr/lib /usr/ccs/lib)
    DynaLoader::bootstrap for DBI (auto/DBI/DBI.so)
    DynaLoader::bootstrap for DBD::ODBC (auto/DBD/ODBC/ODBC.so)
    Illegal instruction(coredump)


    at this point i dont know what to try next ... so here i am ....
    any clues ????

    regards
    Darren Edgerton

    ===================================================================
    Darren Edgerton
    IT Operations Manager
    Reece Australia Limited
    Ph: +613 9274 0000 Fax: +613 9274 0199
    Email: darren.edgerton@reece.com.au Web: http://www.reece.com.au
    ===================================================================

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupbeginners @
categoriesperl
postedSep 23, '02 at 1:31p
activeSep 23, '02 at 10:13p
posts5
users5
websiteperl.org

People

Translate

site design / logo © 2022 Grokbase