If I run the following code it does not work. It looks like its trying to act on '.', I tried adding a dir_pat=>'[a-z|A-Z|0-9]+' to no avail. Is this a bug or did I miss something? Ideas?
$|=1; use Net::SFTP; use Net::SFTP::Recursive qw(:all); use Net::SSH::Perl; $host="somehost"; $user="user"; $password="pass"; $upfile_subdir="/tmp"; $rmt_dir="/home/swares/mgp/installfiles"; print "Setup connection to $host..."; use Net::SFTP::Recursive; my %cfg = ( user=>"$user", password=>"$password", local_dir=>"$upfile_ +subdir", remote_dir=>"$rmt_dir", file_pat=>'.htm$', debug=>1); my $sftp = Net::SFTP::Recursive->new("$host",%cfg); print " Done\n"; print "Get file..."; $sftp->rget("$rmt_dir","$upfile_subdir"); print " Done\n";
# sample debug output swares.ibm.com: Sending subsystem: sftp swares.ibm.com: Requesting service subsystem on channel 1. swares.ibm.com: channel 1: open confirm rwindow 0 rmax 32768 swares.ibm.com: sftp: Sending SSH2_FXP_INIT swares.ibm.com: sftp: Remote version: 3 Done Get file... + from /home/swares/mgp/installfiles to /tmp... swares.ibm.com: sftp: Sent message T:11 I:0 swares.ibm.com: sftp: Sent message T:12 I:1 swares.ibm.com: sftp: Received reply T:104 I:1 swares.ibm.com: sftp: Received 7 SSH2_FXP_NAME responses swares.ibm.com: sftp: Sent message T:12 I:2 swares.ibm.com: sftp: Received reply T:101 I:2 swares.ibm.com: sftp: Received SSH2_FXP_STATUS 1 swares.ibm.com: sftp: Sent message T:4 I:3 + from /home/swares/mgp/installfiles/. to /tmp/.... swares.ibm.com: sftp: Sent message T:11 I:4 swares.ibm.com: sftp: Sent message T:12 I:5 swares.ibm.com: sftp: Received reply T:104 I:5 swares.ibm.com: sftp: Received 7 SSH2_FXP_NAME responses swares.ibm.com: sftp: Sent message T:12 I:6 swares.ibm.com: sftp: Received reply T:101 I:6 swares.ibm.com: sftp: Received SSH2_FXP_STATUS 1 swares.ibm.com: sftp: Sent message T:4 I:7 + from /home/swares/mgp/installfiles/./. to /tmp/./.... swares.ibm.com: sftp: Sent message T:11 I:8 swares.ibm.com: sftp: Sent message T:12 I:9 swares.ibm.com: sftp: Received reply T:104 I:9 swares.ibm.com: sftp: Received 7 SSH2_FXP_NAME responses swares.ibm.com: sftp: Sent message T:12 I:10 swares.ibm.com: sftp: Received reply T:101 I:10 swares.ibm.com: sftp: Received SSH2_FXP_STATUS 1 swares.ibm.com: sftp: Sent message T:4 I:11 + from /home/swares/mgp/installfiles/././. to /tmp/././.... # sample non debug output Setup connection to somehost... Done Get file...Deep recursion on subroutine "Net::SFTP::Recursive::rget" a +t /usr/lib/perl5/site_perl/5.8.0/Net/SFTP/Recursive.pm line 283. Couldn't get handle: Bad message at - line 19 Couldn't get handle: Bad message at - line 19 Couldn't get handle: Bad message at - line 19

In reply to Net::SFTP::Recursive problems by swares

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.