Re: SFTP Doubts
[email protected] ("Chas. Owens")
| Newsgroups | perl.beginners |
|---|---|
| Message-ID | <[email protected]> |
On Tue, May 27, 2008 at 8:26 AM, Rajnikant <[email protected]> wrote: > Hello everyone, > > I'm trying to replace FTP module by SFTP. I'm facing some issues in doing > same. > Following is the list of my doubts :(. snip These are questions, not doubts. See http://www.perlmonks.org/?node_id=444996 for more information about the difference. snip > 1. why are there no ascii and binary methods associated with SFTP? snip Because the spec doesn't call for them. There are innumerable different ways of encoding text and more are being invented everyday. When FTP was invented there were basically three: ASCII, EBCIDIC, and binary. Should SFTP support UTF-8? What about UTF-16? Should it do automatic conversions? No, it should transfer files and leave the conversion decisions to other programs like iconv. The less code in SFTP the less chance of a bug that could compromise security. snip > 2. Are there any methods exists in SFTP similar to that of > login,ascii,binary as that in FTP module? snip Well, IBM added an EBCIDIC->ASCII and vice versa option to their mainframe version, but to my knowledge that is it. snip > 3. How to check SFTP method failure in Perl? snip Depends on what module you are using. snip > 4. how to delete the SFTP object created by New method? snip The same way all Perl objects are garbage collected, when it goes out of scope. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read.