-my $bliz = LWP::Authen::OAuth2->new(
- client_id => '7f0f95ac9529474f854ee8d68a12c3e0',
- client_secret => 'Kfa8n98UAaDo4brOeqxe9C2kJE9pqpSd',
- token_endpoint => 'https://us.battle.net/oauth/token',
- request_required_params => [qw( client_id client_secret grant_type )],
-);
-$bliz->request_tokens(grant_type => 'client_credentials');
+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 || []};