myset($match, @words); sub myset { my $match = shift; # Do whatever set algorithm here, # using $match to compare words }