open(IN, $ARGV[0]); @foo = grep { m/$ARGV[1]/ } <IN>; print @foo; [download]
In reply to Re: storing grep output to variable by blueAdept in thread storing grep output to variable by Anonymous Monk