in reply to Re^4: Perl grep an array of values in a file
in thread Perl grep an array of values in a file
I see you found that here... unfortunately what you've posted contains one bug and one potential bug:
my @typedefs = qw(acuser, replica_sync_cmd, 2015/01/13);
That doesn't do what you expect it to, Perl even warns about that: "Possible attempt to separate words with commas ...". What you want is
my @typedefs = qw(acuser replica_sync_cmd 2015/01/13);
because qw// splits on whitespace, not commas.
Also, if @typedefs contains literal strings to be matched, you'll want to write the regex as /\Q$_/.
|
|---|