Re: Why can't I create a binary file ?
Bee wrote: > > open FH, ">1.txt"; > binmode FH; > binmode STDOUT; > print FH "123m,zxnc,mzxnc,mzncm,zxc"; > close FH; > > Why the output still a text file ? Other posters are right. What is your test, that you find your output to be a text file? Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why can't I create a binary file ?
> Bee wrote: > > open FH, ">1.txt"; > > binmode FH; > > binmode STDOUT; > > print FH "123m,zxnc,mzxnc,mzncm,zxc"; > > close FH; > > > > Why the output still a text file ? > Thanks everybody, the way I tried to make files to binary format is just because I want to learn how to sysread and syswrite. I suppose I can write some bytes anywhere I like, without re-writing the whole file again... So, for the advise of using "pack"... any example or hints ? For what I am expecting to see in the content, I guess I would see some monster chars I guess, at least not as is the content itself. Thanks in advise -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why can't I create a binary file ?
Bee wrote: > open FH, ">1.txt"; > binmode FH; > binmode STDOUT; > print FH "123m,zxnc,mzxnc,mzncm,zxc"; > close FH; > > Why the output still a text file ? A file's a file. Terms like "text" and "binary" are just conventions. To the OS, a file's just a collection of bytes. What were you expecting to be in the file? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why can't I create a binary file ?
Bee wrote: > open FH, ">1.txt"; > binmode FH; > binmode STDOUT; > print FH "123m,zxnc,mzxnc,mzncm,zxc"; > close FH; > > Why the output still a text file ? Only thing binmode gives you is that what you put in will not be in any way translated as part of the print and/or write. If you want to have binary data, then you would use pack and its parameters to put onto your file binary data. Wags ;) ** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why can't I create a binary file ?
> Why the output still a text file ? This is a stab in the dark, but the binary equivalent of the characters in the string are characters, correct? Have you tried seeing what happens when you output hex values? -Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]