in reply to Net::FTP & if statement behavior

Hi,
what I can see is:
print 1; # prints "1" print if 1; # prints nothing
try something like:
print 1 if ( $ftp->cwd( $whole ) );
Does this help you?

alex pleiner <alex@zeitform.de>
zeitform Internet Dienste

Replies are listed 'Best First'.
Re(2): Net::FTP & if statement behavior
by dmmiller2k (Chaplain) on Jan 02, 2002 at 23:00 UTC

    Nice catch, projekt21.

    On first scan of the code, I missed the if (or at least the behavioral significance of it). Conceivably, alienhuman may have made the same mistake.

    dmm

    You can give a man a fish and feed him for a day ...
    Or, you can
    teach him to fish and feed him for a lifetime
Re: Re: Net::FTP & if statement behavior
by alienhuman (Pilgrim) on Jan 02, 2002 at 22:56 UTC
    Ugh. What a rookie mistake. Thx.