Skip to content

Instantly share code, notes, and snippets.

@leedo
Created May 24, 2013 15:45
Show Gist options
  • Save leedo/5644431 to your computer and use it in GitHub Desktop.
Save leedo/5644431 to your computer and use it in GitHub Desktop.
use Test::More;
my @patterns = qw{a b c};
my $string = q{c};
my $pattern = qr{((?{ join "|", @patterns }))};
ok $string =~ $pattern, "matches";
done_testing();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment