Hehe.. that is because binary calls the type command internally,
which returns the _old_ value of the type, not the value you set it
to. :)
On Tue, May 18, 2004 at 01:41:45PM -0000, PerlDiscuss - Perl Newsgroups and mailing
lists wrote:
> Ok, I resolved the issue.
>
> For some reason PERL does not like the command:
> $bin=$ftp->binary;
>
> The reason why I needed a variable is to "verify" that it is actually in
> BIN mode. What I to resolve this issue was to code as follows:
>
> $ftp->binary;
> $bin=$ftp->type;
>
> By doing it this way I was able to set it to Binary and then retrieve the
> type.
>
> Thanks for all your assistance.
>
> Isaac
>
> Perldiscuss - Perl Newsgroups And Mailing Lists wrote:
>
> > I am trying to get my program to switch to Binary mode. I know the command
> > is ftp->binary();, however, it does not work. By chance, i got the program
> > to work only when i have the following lines of code inserted:
> > $bin=$ftp->binary or die "Can not change the Type to Binaryn";
> > $bin=$ftp->binary;
>
> > If I take out any of those lines it transfers in Ascii mode. Why?
>
> > Thanks
> > Isaac
>
>
--
www.suave.net - Anthony Ball - [EMAIL PROTECTED]
OSB - http://rivendell.suave.net/Beer
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
He who does not prevent a crime when he can, encourages it.[Seneca]