-my ($profileid, $clanmatch) = @ARGV; # clan host and name
-$profileid and $profileid =~ /\A\d+\z/
- or die "Usage: $0 <profile id> [<clan name>]\n";
+my ($profiles, $clanmatches) = part { /\D/ } @ARGV; # separate numbers
+@{$profiles}
+ or die "Usage: $0 <profile id>... [<clan name>...]\n";
+my ($clanmatch) = map { $_ && qr/\A(?:$_)\z/i } join '|', @{$clanmatches};