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";