in reply to Re: Missing byte using unpack, pack, read(in terms of bytes)
in thread Missing byte using unpack, pack, read(in terms of bytes)
Windows 7 64-bit perl v5.12.3 I open the file using...
open(IN, $nameoffile) or die "Can't open $!\n";I have not seen binmode so I am definitely not using that. I have my .pl file on a classified network not connected to the internet so I would have to retype the entire thing. I am almost positive it is not my code though since I can repeat the exact same time thousands of times before this issue pops up at some random point.
EDIT: Looking at binmode, before I open the file, should it be...
binmode STDIN, ":bytes"; open(IN, $nameoffile) or die "Can't open $!\n";Or should it be...
binmode IN, ":bytes"; open(IN, $nameoffile) or die "Can't open $!\n";EDITEDIT: I just tried including binmode and the behavior didn't change whatsoever, unless both of my examples above are wrong. As far as I can tell these files contains a single massive block of hex data so I don't think I have to worry about any newlines.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Missing byte using unpack, pack, read(in terms of bytes)
by RichardK (Parson) on Jul 23, 2012 at 22:46 UTC | |
by joemaniaci (Sexton) on Jul 23, 2012 at 22:50 UTC |