38 |
my $i = 0; |
my $i = 0; |
39 |
for my $old (map {[split /\x1F/, $_, 2]} split /\x1E/, $source) { |
for my $old (map {[split /\x1F/, $_, 2]} split /\x1E/, $source) { |
40 |
my $page = [split m#//#, $old->[0]]; |
my $page = [split m#//#, $old->[0]]; |
41 |
my %referer = map {split /\x09/, 2} split "\x0A", $out->get ('referer', $page); |
my %referer = map {split /\x09/, 2} split /\x0A/, $out->get ('referer', $page); |
42 |
my %newref = split /"/, $old->[1]; |
my %newref = split /"/, $old->[1]; |
43 |
for (keys %newref) { |
for (grep {$_} keys %newref) { |
44 |
$referer{$_} += $newref{$_}; |
$referer{$_} += $newref{$_} if $_ and $newref{$_}; |
45 |
} |
} |
46 |
$out->set ('referer', $page |
$out->set ('referer', $page |
47 |
=> join "\x0A", map {$_ . "\x09" . $referer{$_}} keys %referer); |
=> join "\x0A", map {$_ . "\x09" . $referer{$_}} keys %referer); |