On Fri, 31 May 2002, Haimov, Eugene wrote:

> Use "pack()" function on $currentdate,
> then syswrite its result.
>
> -----Original Message-----
> From: Michele Knight [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 31, 2002 4:10 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: Adding/Multiplying binary numbers in Perl
>
>
> Thanks.  I got the binary numbers correctly and when I try to write that
> number in it's binary format to a file using binmode(FILEHANDLE) it still
> writes the character format instead of binary format.  Here is what I used:
>
> open(FILEHANDLE, ">$file");
> binmode(FILEHANDLE);
> sysseek(FILEHANDLE, 0x0000A500, 0);
> syswrite(FILEHANDLE $currentdate);
>
> Do you know what I'm doing wrong?
>

Yes, you are assuming that binmode makes the data be written out
in binary format. It doesn't.

**** [EMAIL PROTECTED] <Carl Jolley>
**** All opinions are my own and not necessarily those of my employer ****

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to