in reply to Re: perl grep clone
in thread perl grep clone

This dosen't work for me because perl tries to interpret the pattern as a file name, but I found it does not use this behavior when using <STDIN> instead of <>.

29:

# 5 0 5 0 5 9 print grep/$ARGV[0]/,<STDIN>;

Replies are listed 'Best First'.
Re^3: perl grep clone
by morgon (Priest) on Apr 01, 2016 at 23:08 UTC
    I cheat a little and assume only one argument on the command line:
    print grep/@ARGV/,<STDIN>;