Where in the code you show do you set $hostgetdir?
Also, getcwd() will only ever show the local directory and never the remote directory. See Net::SFTP::Foreign for the ->cwd method to find the current working directory of the remote session.
In reply to Re: Change to the Host directory in SFTP using Perl Script
by Corion
in thread Change to the Host directory in SFTP using Perl Script
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |