LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   perl NET::FTP binary mode (https://www.linuxquestions.org/questions/programming-9/perl-net-ftp-binary-mode-26063/)

lackluster 07-18-2002 09:27 AM

perl NET::FTP binary mode
 
Hi all,

Evertime I upload files using NET::FTP all images/pdfs/dll's and stuff get screwed up. How can I throw put into binary? Thanks.

MartBrooks 07-18-2002 09:32 AM

This is very clearly explained in the module's CPAN page:

http://search.cpan.org/doc/GBARR/libnet-1.12/Net/FTP.pm

See the "type" method.

Regards

lackluster 07-18-2002 09:47 AM

Quote:

type (TYPE [, ARGS])

This method will send the TYPE command to the remote FTP server to change the type of data transfer. The return value is the previous value.
ascii ([ARGS]) binary([ARGS]) ebcdic([ARGS]) byte([ARGS])

Synonyms for type with the first arguments set correctly
NOTE ebcdic and byte are not fully supported.
I've seen this before, but I don't see how it's clearly explained. Would you mind dumbing it down for me? An example would be wonderful. How am I supposed to know what ARGS could be?

lackluster 07-18-2002 09:52 AM

Okay....I think I got it...but my question "How am I supposed to know what ARGS could be?" remains.

MartBrooks 07-18-2002 03:13 PM

Did you try it with no "ARGS" at all?

lackluster 07-18-2002 06:30 PM

yes - that's why I said I think I got it working. I was wondering though what I could optionally specify.


All times are GMT -5. The time now is 05:40 PM.