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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: comparison of packed signed integers
by BrowserUk (Patriarch) on Oct 30, 2011 at 11:24 UTC | |
by johngg (Canon) on Oct 30, 2011 at 11:36 UTC | |
by BrowserUk (Patriarch) on Oct 30, 2011 at 12:00 UTC | |
by johngg (Canon) on Oct 30, 2011 at 12:28 UTC | |
by BrowserUk (Patriarch) on Oct 30, 2011 at 12:33 UTC | |
by gerleu (Novice) on Oct 30, 2011 at 12:06 UTC | |
by BrowserUk (Patriarch) on Oct 30, 2011 at 12:16 UTC | |
by gerleu (Novice) on Oct 30, 2011 at 12:36 UTC | |
by gerleu (Novice) on Oct 30, 2011 at 12:51 UTC | |
by BrowserUk (Patriarch) on Oct 30, 2011 at 12:39 UTC |