NAME
Number::Range - Perl extension defining ranges of numbers and testing later if a number is in it
SYNOPSIS
use Number::Range;
my $range = Number::Range->new("-10..10,12,100..120");
if ($range->inrange("13")) {
print "In range\n";
} else {
print "Not in range\n";
}
DESCRIPTION
Number::Range will take a description of range(s), and then allow you to test later on if a number falls within the range(s).
RANGE FORMAT
The format used for range is pretty straight forward. To separate sections of ranges it uses a , or whitespace. To create the range, it uses .. to do this, much like Perl's own binary .. range operator in list context.
EXPORT
None by default.
AUTHOR
Larry Shatzer, Jr., <larrysh@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2004 by Larry Shatzer, Jr.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.