| Perlbug documentation | view source | Contained in the Perlbug distribution. |
Perlbug::Object::Range - Range class
Perlbug Range class.
For inherited methods, see Perlbug::Object
use Perlbug::Object::Range;
my $o_rng = Perlbug::Object::Range->new();
print $o_rng->read('123');
Create new Range object:
my $o_rng = Perlbug::Object::Range->new();
Return a string representing the shortened (ranged) version of the given list
my $str = $o_rng->rangeify(\@list); # qw(1 3 4 6 123) -> '1,3-6,123'
Return a list from the shortened (ranged) string from the db
my @list = $o_rng->derangeify($string); # '1,3-6,123' -> [(1 3 4 6 123)]
Richard Foley perlbug@rfi.net 2001
| Perlbug documentation | view source | Contained in the Perlbug distribution. |