@companies = ("FOO,BAR"); #### @companies = ("FOO", "BAR"); # or @companies = qw(FOO BAR); #### # Use quotemeta if companies are not really # foo and bar and contain metacharacters. my $companies = join("|", map(quotemeta, qw(FOO BAR))); print "$1\n" if $content =~ /($companies)/;