http://qs321.pair.com?node_id=622930


in reply to Re^3: (thoughts on) Detect common lines between two files, one liner from shell
in thread Detect common lines between two files, one liner from shell

The generalized form would be (golfed down a bit) for any number of files
perl -ne'BEGIN{$p.=-$_."+"for-@ARGV+1..-1;$p.=0}print if($s{$_}.=@ARGV +)=~/$p$/'

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}