Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Appologies gentlemen that I was away. Well thank you everyone who have shared the thoughts towards my query. Mr Soonix no luck sir. Following is exactly what I tried, No progress is shown when I downloaded file :(.

print "Connecting to the sftp share! Please wait....!\n"; my $sftp = Net::SFTP::Foreign->new($LOG_HOST, user => +$REM_USER, password => $REM_PASSW); $sftp->setcwd($REM_PATH) or die "unable to change cwd: + " . $sftp->error; print "OK. On the share! Downloading the file \"$REM_F +ILE\"...................!\n\n\n"; $sftp->error and die "Problem connecting to the share. +..!!!! " . $sftp->error; # if ($sftp->get($REM_FILE)){ if ($sftp->get($REM_FILE, $REM_FILE, callback => \&sho +w_progress)) { print "File \"$REM_FILE\" downlaoded to ===> +\"$LOC_PATH$LOC_DIR\"\n\n"; } else { print "File \"$REM_FILE\" does not seem to hav +e been sent. Please re-request...!\n\n"; } sub show_progress { my($sftp, $data, $offset, $size) = @_; print "downloaded $offset of $size bytes\r";

In reply to Re^10: Perl sftp behavior when there are no files in the share by Bindo
in thread Perl sftp behavior when there are no files in the share by Bindo

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-20 02:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found