Edu Edu - 1 year ago 143
Perl Question

How to set the transfer mode to ASCII in SFTP (version 3) using Perl

I have a requirement to transfer the files using SFTP (version 3) in Perl. While transferring the files, I need to set the transfer mode to ASCII.

Can some one please confirm, it if is possible using any of the Perl modules (


Answer Source

Using Net::SFTP::Foreign:

$sftp->put($local_from, $remote_to, conversion => 'unix2dos');

See On the fly data conversion.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download