To read binary files, you need to understand read(), seek() and unpack(),
as well as the underlying binary structure of the file.  Peeking into the
file with a hex editor will help distinguish the ASCII bits from the rest.
If you know the C code that creates the file, that can help a lot!

Luke

email privately for more help


On Tue, 31 Jul 2001, Tyler Cruickshank wrote:

> Hello.
>
> Looking for some binary file help.  I want to read, manipulate, and print (in ascii) 
>a binary file on a solaris 7 machine.  I have looked into and tried the binmode() 
>function but this seems to be for older machines that differentiate between ascii and 
>binary files.  I have tried the following and just get the binary form printed back 
>out at me (the expected result):
>
> open(FILE, "mybinaryfile") || or die "error\n";
> while(<FILE>){
> print "$_\n";
> }
>
> When perl reads a binary file as above, does it understand what it is reading?  How 
>can I print the file back out in ascii?
>
> Thank you.
>
> Tyler Cruickshank
> UDAQ
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to