LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-18-2002, 10:27 AM   #1
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Rep: Reputation: 30
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.
 
Old 07-18-2002, 10:32 AM   #2
MartBrooks
Member
 
Registered: May 2002
Location: London
Distribution: Debian
Posts: 388

Rep: Reputation: 31
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
 
Old 07-18-2002, 10:47 AM   #3
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Original Poster
Rep: Reputation: 30
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?
 
Old 07-18-2002, 10:52 AM   #4
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Original Poster
Rep: Reputation: 30
Okay....I think I got it...but my question "How am I supposed to know what ARGS could be?" remains.
 
Old 07-18-2002, 04:13 PM   #5
MartBrooks
Member
 
Registered: May 2002
Location: London
Distribution: Debian
Posts: 388

Rep: Reputation: 31
Did you try it with no "ARGS" at all?
 
Old 07-18-2002, 07:30 PM   #6
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Original Poster
Rep: Reputation: 30
yes - that's why I said I think I got it working. I was wondering though what I could optionally specify.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set binary mode as default in FTP ??? montylee Linux - Newbie 2 03-30-2009 09:05 AM
Urgent Help: Perl FTP Script Using NET::FTP xboxter Programming 8 05-16-2005 07:57 PM
Wget - forcing binary mode? Darklegion Linux - Software 1 08-26-2004 12:24 AM
perl and Net::FTP question Tomasfuego Programming 0 12-17-2003 09:13 AM
perl, Net::Ftp, and Novell file modification time neo77777 Programming 0 01-30-2003 10:41 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration