XP is just a number | |
PerlMonks |
Re^2: Missing byte using unpack, pack, read(in terms of bytes)by joemaniaci (Sexton) |
on Jul 23, 2012 at 22:27 UTC ( [id://983246]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|