There's more than one way to do things | |
PerlMonks |
comparison of packed signed integersby gerleu (Novice) |
on Oct 30, 2011 at 11:10 UTC ( [id://934705]=perlquestion: print w/replies, xml ) | Need Help?? |
gerleu has asked for the wisdom of the Perl Monks concerning the following question: Hello, Please is it possible to check if a signed integer packed in 4 bytes is within a certain range, without unpacking it at first ? I've tried to pack both the lower and higher boundary signed integers with the 'l' canevas, but using '<' and '>' operators doesn't work... The reason of my question: I've one huge file containing packed signed integers and I need to compare then to a range of two signed integers, but the unpack operation for each value in the file is too much time-consuming ! Maybe I need to use an other canevas for such purpose ? Thanks in advance for your miraculous help, Germain
Back to
Seekers of Perl Wisdom
|
|