Take a look at the API doc for whatever SFTP program you are accessing;
it may be returning values you are not expecting.  After you instantiate
via the new method in OLE you are passed back whatever the external
program passes back.  It could be passing back 0 upon success which will
cause die to work azz-backwards.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 25, 2006 9:23 AM
To: [EMAIL PROTECTED]; Bharucha, Nikhil; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Cc: perl-win32-users@listserv.ActiveState.com
Subject: Resolved - Question about Win32::OLE

First, thanks to all who offered their assistance. I spent many hours
trying
to make my simple test script work...and it does (did)! Darn thing had
been
working all the time (very embarassing).

The problem seems to be die or warn in this line:
$SFTPServer->connect( $Server, $Port, $UserName, $Password ) or die
"Could
not connect as $UserName to $Server:$Port!";

This line does not cause the error message.
$SFTPServer->connect( $Server, $Port, $UserName, $Password );

Apparently, both versions were actually making a connection while I
thought
it was failing because of the message. I'm guessing that die/warn should
not
be used with win32::OLE. LastError seems the correct construct.

Again, thanks to all
Sturdy


_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to