in reply to Set::Scalar - Regexp as method parameter?

You could overload the has method (which is actually in Set::Scalar::Base), or just add something similar to it like so
use Set::Scalar; sub Set::Scalar::Base::has_re { my $self = shift; my @has; foreach my $el (keys %{$self->{'elements'}}) { push @has, $el =~ /$_/ for @_; } return wantarray ? @has : "@has"; } my $s = Set::Scalar->new('a','b','c(d)'); if(my $sub_el = $s->has_re(qr/c\((.+)\)/)) { print "found it $sub_el\n"; } __output__ found it d
That's not the greatest example of well-tested code but I'm sure you get the idea. Also make sure you quote your regexes or you won't get what you expect (the qr// operator is your friend!).
HTH

_________
broquaint