I have downloaded and registered the COM using https://winscp.net/eng/docs/library_install, the tlb file is also registered successfully on my Windows box.
I tested the WinSCP.exe with the SFTP connection and it works perfectly.
However, my requirement is to automate it through Perl. I have gone through https://winscp.net/eng/docs/library#perl and tried to test the same code (by PUTting local file on my machine to remote server which I can do it via WinSCP.exe).
I tried to use "GiveUpSecurityAndAcceptAnySshHostKey" and also later removed this key and used the actual SSH Key with "SshHostKeyFingerprint". In both the cases, I am getting NULL $transferResult (error: Can't call method "Check" on an undefined value at mytest.pl line XX.)
The code is exactly same as in example (with changes to actual file location).
Can someone point out what is missing here or what should be done in order to achieve automation via Perl?