S
Steve Bennett
Can anyone suggest a good tutorial for reading
and writing binary files in Perl or send me some tips or examples?
I tried using pack and unpack and seek and read
but things don't work as expected so I must be missing
some subtle details.
For example: I tried reading a .RAW image file (no header info) and
writing it back out
using seek read and print.
It almost worked but any part of the image that was black
threw things off. I suspect maybe the zeros (black) were somehow
being interpreted as EOF or NUL or something.
I also suspect that there are issues with word boundries I don't quite
grasp.
Thanks,
-Steve
and writing binary files in Perl or send me some tips or examples?
I tried using pack and unpack and seek and read
but things don't work as expected so I must be missing
some subtle details.
For example: I tried reading a .RAW image file (no header info) and
writing it back out
using seek read and print.
It almost worked but any part of the image that was black
threw things off. I suspect maybe the zeros (black) were somehow
being interpreted as EOF or NUL or something.
I also suspect that there are issues with word boundries I don't quite
grasp.
Thanks,
-Steve