my %num2call = do '070-members-20101119.inc'; my %call2num; @call2num{ values %num2call } = keys %num2call; { version => '03', contest_name => 'New Member On-the-air Jamboree', contest_id => '070-Jamboree', filter => { mode => \"IN ('PSK31', 'BPSK', 'BPSK31', 'QPSK31')", band => \"IN('160M','80M','40M','20M','15M','10M','6M')", }, defaults => { log_cols => [qw/ call qso_date time_on band mode srx /], placeholders => [qw/ Category 070-Number Email SOAPBOX /], scoreboard_cols => [qw/ 070-number /], dropbox_options => { Category => [ '070 Club Member', 'Non-member', ], }, show_matched_qsos => 1, update => sub { my $row = shift; my %h; $h{call} = $row->{call}; $h{call} =~ s#^[A-Z]+\d*/##; # strip portable from front, e.g. W3/ $h{call} =~ s#/(\d+|P|QRP)$##i; # strip portable from back, e.g. /7 or /P or /QRP $h{srx} = $1 if $row->{srx} =~ /\D/ && $row->{srx} =~ /\b(\d+)\b/; $h{srx} = sprintf '%04d', $h{srx} || $row->{srx} || 0; if( $h{srx} !~ /[1-9]/ ){ $h{contest_use} = sprintf "(No 070# in exchange) [%s=>%s]", $h{call}, $call2num{ $h{call} } if $call2num{ $h{call} } ; }elsif( $h{call} ne $num2call{ $h{srx} } ){ $h{contest_use} = sprintf "(Call/070# do not match) [%s=>%s, %s=>%s]", map { $_ || q{''} } $h{call}, $call2num{ $h{call} }, $h{srx}, $num2call{ $h{srx} }, ; } return \%h; }, Qs => [ { label => "ERRORS", weight => 0, group_by => 'call,qso_date,time_on,band,srx, contest_use', where => { contest_use => {'!='=>1} } }, # { # label => '070 Members', # group_by => 'call, band, srx', # where => { # srx =>{'!=','0000'}, # contest_use => 1, # }, # value_col => 'srx', # }, { label => "Non-members", weight => 1, group_by => 'call, band', where => { srx =>'0000' } }, map { { label => "070 #$_", weight => $_, group_by => 'call, band', where => { srx =>"$_", contest_use => 1 } }, } reverse sort keys %num2call ], mults => [ { group_by => 'mycall', $INPUT{'Category'} =~ /070 Club Member/i ? ( label => '070 Club Member', weight => 2010 ) : ( label => 'Non-member', weight => 1 ) }, ], contest_url => 'http://www.podxs070.com/2010-jamboree', contest_logo => 'http://www.podxs070.com/images/stories/psk31_dog.png', }, years => { 2010 => { sample => '0a7689a2f3a54d9c49e7e33fdccd0df4', filter => { qso_date => { -between => [20101120, 20101120] }, }, }, }, }