Avoid connect time by maintaining session across operations
I have to write a script where I get a listing of the remote directory. Select a few files and then delete them. Then choose some replacement files and put them on the server.
Problem that I face is that each time I have to some string operations in Perl, I have to close winscp connection and then open a connection again. These many opens take around 80% of the script execution time.
Is there a way I can open connection once. Keep moving from Winscp scripts and Perl scripts and then close in the end?