in reply to Re^2: Mysteries of unpack("a", ...)
in thread Mysteries of unpack("a", ...)
I am curious as to what "*_" means? I couldn't find that in my reference books.
The kind of binary files I usually deal with might have
an odd number of bytes and I have to fix it up in the final
result with either 16 bit aligned or 32 bit aligned values. Sometimes that means shifting things over a byte or more, So something like:
my $n_bytes = read(INBIN, $buff, $BUFSIZE); is the ticket. Your mileage
may vary as they say! I haven't written any really hairy binary stuff in Perl.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Mysteries of unpack("a", ...)
by ikegami (Patriarch) on Jan 03, 2009 at 18:17 UTC |