Turning number ranges into prefixes
David Cantrell
david at cantrell.org.uk
Wed Aug 23 17:08:06 BST 2006
On Wed, Aug 23, 2006 at 03:31:06PM +0100, Simon Cozens wrote:
> On Wed, Aug 23, 2006 at 02:34:39PM +0100, David Cantrell wrote:
> > I have a little problem that I could do with some help with. I have
> > data specifying number ranges. For example, 1424210000 - 1424225999. I
> > need to turn that into a list of prefixes like 142421, 1424220, 1424221,
> > 1424222, 1424223, 1424224, 1424225. That range includes all the numbers
> > of the right length with those prefixes, and no others. Is there a
> > terribly clever way of generating the list?
> String XOR the numbers together.
Errm?
$ perl -e 'print "1424210000" ^ "1424225999"'
[some whitespace]
--
David Cantrell | top google result for "internet beard fetish club"
More information about the london.pm
mailing list