in reply to Re^2: Perl grep an array of values in a file
in thread Perl grep an array of values in a file

I'm tempted to reply that neither will I waste my time answering if I do know the answer, and thank you very much, but will confine myself to the following.

I don't think the expression  /\Q@array/ is compiling the regex you expect. Consider

c:\@Work\Perl>perl -wMstrict -le "my @array = ('acuser', 'sync_cmd', '2015-01-13'); my $rx = qr/\Q@array/; print $rx; " (?^:acuser\ sync_cmd\ 2015\-01\-13)
which doesn't seem to make much sense in the context of the given example data. Is this really what you want?


Give a man a fish:  <%-(-(-(-<

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.