From the little exposure I have had to the Net:: protocols they seem to try to provide a low-level interface that implements the
protocol, to be used as building blocks for people to actually write user friendly (hopefully) clients and servers in. Sometimes some more convenient subroutines are also thrown in. Which pretty much covers Net::SFTP. The real power of it is the low-level calls, not the simpler extras.
I think we have a tendancy to take for granted even the most basic of conveniences in these types of clients. For example, does the File Transfer Protocol (FTP) have an mput and mget designed in or is it actually something the client and server software implement? I know which way I would bet....
Anyway, as others have mentioned, you will either need to create the local directory yourself and then build a list of files to get one at a time or take a look at jdtoronto's suggestion of using Net::SFTP::Recursive.
If you have the time to learn and experiment I'd suggest trying to do it yourself -- you will come to a much better understanding of how SFTP works and (generalizing a bit) how other client/server based protocols actually work.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.