Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Net::FTP & if statement behaviorby alienhuman (Pilgrim) |
on Jan 02, 2002 at 22:44 UTC ( [id://135751]=perlquestion: print w/replies, xml ) | Need Help?? |
alienhuman has asked for the wisdom of the Perl Monks concerning the following question: Hi Monks, I'm using Net::FTP to great effect, however I've recently found some very strange behavior when I put a ftp method call into an if statement. To wit: The following method returns the value "1" when it is successful, as described in the perldoc, and evidenced in this snippet from the debugger...
However, the same method call inside an if statement doesn't evaluate TRUE... which is not at all what I expected...
Why doesn't this if( $ftp->cwd( ... ) ); evaluate to true, if the value returned by $ftp->cwd is 1? Thanks, Chris
Back to
Seekers of Perl Wisdom
|
|