ignore missing clan restriction; fallback to user name
[sc2-widget] / getsc2clan
index 328553523d7b6834281c05b2a5a26afa0c3fa49b..9e6222ac74e5690457212ad0190095c567d79e7c 100755 (executable)
@@ -16,7 +16,7 @@ if (@ARGV and all { m[/] } @ARGV) {
 my ($profiles, $clanmatches) = part { /\D/ } @ARGV;  # separate numbers
 $profiles && @{$profiles}
        or die "Usage: $0 <profile id>... [<clan name>...]\n";
-my ($clanmatch) = map { $_ && qr/\A(?:$_)\z/i } join '|', @{$clanmatches};
+my ($clanmatch) = map { $_ && qr/\A(?:$_)\z/i } join '|', @{$clanmatches || []};
 
 sub blizget {
        state $bliz = do {