- my @hits = split /\0/o, $value;
- push @$results, [ scalar reverse($key), @hits ];
+ my @files = split /\001/o, $value;
+ foreach my $f (@files) {
+ my @hits = split /\0/o, $f;
+ my $file = shift @hits;
+ if ($file eq '-') {
+ $file = reverse($key);
+ }
+ push @$results, [ $file, @hits ];
+ }