[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] MacPerl->FTP



I was wondering, on the FTP package, when you want to
transfer a binary file if there is anything you need to put
as an argument to the BINARY call?  Here is what I am
doing:

    $theMessage = "";
    $ftp = Net::FTP->new( "trillian.jsc.nasa.gov" );
    $theMessage .= $ftp->login( "ftp", "igoal\@\sun.jsc.nasa.gov" ) + "\n";
    $theMessage .= $ftp->cwd( "pub" ) + "\n";
    $theMessage .= $ftp->cwd( "MLDB" ) + "\n";
    $theMessage .= $ftp->binary() + "\n";
    $theMessage .= $ftp->put( "$userName.tar" ) + "\n";
    $theMessage .= $ftp->quit + "\n";

I've put in the $theMessage statements to help me see what
is happening.  What I get back is this:

1
1
1
0
0
1

Which I take to mean:

ok
ok
ok
sorry - no good
sorry - no good
ok

So I was wondering (since there isn't a good example in the
FTP.pm file about this) if something is supposed to go in the
"binary()" call?  I've looked through the FTP.pm program
and found the:

sub binary { shift->type('I',@_); }

Which tells me that there is an argument which is supposed
to be passed to the TYPE command.  But there isn't an
explanation of what is supposed to go there.

TIA for anyone's help.  :-)

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch