my $alternations = join '|', keys %xref; my $regexp = qr/\b($alternations)\b/;