need help reading/writing binary

From: Steve Bennett (nospam_at_no.spam.com)
Date: 08/25/04

  • Next message: Liang: "how to get the number of keys in an hash"
    Date: Wed, 25 Aug 2004 02:11:42 -0400
    
    

    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


  • Next message: Liang: "how to get the number of keys in an hash"

    Relevant Pages

    • Re: More station photography woes (& police searching)
      ... > suspect, especially if I was the first of a raid team going in. ... > radio and proved it when he drove from Reading to Slough at 3am to try and ... It is the guy I'm thinking of, he used to phone the TVS Reading office with ... info he'd got from listening in to Police radio and then try and get money ...
      (uk.railway)
    • Re: the maximalistic position (Was: Children and Observance/Davening)
      ... >>And I don't know where you learned that the default reading of a text ... It's not my personal view (which, I suspect, is even more naturalistic than ... And these amoraim attributed a sinaitic origin to their teachings ...
      (soc.culture.jewish.moderated)
    • Re: Need Help: C++ Delete Known File
      ... Without reading through the entire thread, I suspect ... the problem is you are not in the correct directory ... > Onwards with the school studying. ...
      (comp.lang.cpp)
    • Re: More station photography woes (& police searching)
      ... suspect, especially if I was the first of a raid team going in. ... As for the photographer he's still around, ... and proved it when he drove from Reading to Slough at 3am to try and ...
      (uk.railway)
    • Re: word 2002 normal.dot
      ... Suzanne's replies requesting additional information from a poster in ... reading approximately 15,000 posts she has made to the newsgroups from ... When you're done I suspect you will gladly return and make a public ... apology to one of the most dedicated MVPs I know. ...
      (microsoft.public.word.application.errors)