in reply to removing doubles by comparing two strings - newbie question!

Untested.

my $c = join ', ', List::Compare->new(qw/-u -a/, [$a =~ /(\d+)/g], [$b =~ /(\d+)/g])->get_intersection;