Set::Scalar Perl module contains a basic set of operations.
SYNOPSIS
use Set::Scalar;
$s = Set::Scalar->new;
$s->insert('a', 'b');
$s->delete('b');
$t = Set::Scalar->new('x', 'y', $z);
Creating
$s = Set::Scalar->new;
$s = Set::Scalar->new(@members);
$t = $s->clone;
$t = $s->copy; # clone of clone
Modifying
$s->insert(@members);
$s->delete(@members);
$s->invert(@members); # insert if hasn't, delete if has
$s->clear; # removes all the elements
Note that clear() only releases the memory used by the set to be reused by Perl; it will not reduce the overall memory use.
Product's homepage
Requirements:
· Perl