Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: (thoughts on) Detect common lines between two files, one liner from shell

by shmem (Chancellor)
on Jun 22, 2007 at 23:55 UTC ( [id://622930]=note: print w/replies, xml ) Need Help??


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}
  • Comment on Re^4: (thoughts on) Detect common lines between two files, one liner from shell
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://622930]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2026-02-18 05:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.