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

This node falls below the community's minimum standard of quality and will not be displayed.
  • Comment on Re^2: Perl grep an array of values in a file

Replies are listed 'Best First'.
Re^3: Perl grep an array of values in a file
by AnomalousMonk (Archbishop) on Jan 15, 2015 at 18:53 UTC

    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:  <%-(-(-(-<

    A reply falls below the community's threshold of quality. You may see it by logging in.