in reply to How to handle both a STDIN pipe and file from command line?
echo -e "One\nTwo\nother\mmore\nthan\nthat" | perl -ne 'BEGIN{chomp (@ +arr=<STDIN>);$x=join("|",@arr)};s /$x/FOOOO/; print "FILE:$_" ' file. +txt
"I'm fairly sure if they took porn off the Internet, there'd only be one website left, and it'd be called 'Bring Back the Porn!'"
-- Dr. Cox, Scrubs
|
|---|