in reply to Change to the Host directory in SFTP using Perl Script
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.
|
|---|