<?xml version="1.0" encoding="windows-1252"?>
<node id="46545" title="Re: Re: (thoughts on) Detect common lines between two files, one liner from shell" created="2000-12-14 00:26:44" updated="2005-07-21 01:24:54">
<type id="11">
note</type>
<author id="9073">
merlyn</author>
<data>
<field name="doctext">
Yeah, it's not an obfuscation by any means.  Just a nice way to put together a lot of common features.  In fact, I'd take it one step further to fulfill one additional
monkey wrench thrown in after that posting was made:  what if the line appears more than once in either fileA or fileB or both, but you still want only one copy of the line?
&lt;p&gt;
Well, the answer is just as straightforward.  Remove the dollar from the regex!
I'll leave &lt;i&gt;that&lt;/i&gt; explanation as an exercise to the clever reader. {grin}

&lt;p&gt;-- &lt;a href="http://www.stonehenge.com/merlyn/"&gt;Randal L. Schwartz, Perl hacker&lt;/a&gt;&lt;/p&gt;

&lt;hr&gt;
&lt;b&gt;update:&lt;/b&gt; Bleh!  My mistake, the dollar was &lt;b&gt;added&lt;/b&gt; to handle this case!
I knew I had needed to deal with multiple hits somehow.
&lt;p&gt;
Remind me never to post again. {grin}</field>
<field name="root_node">
36725</field>
<field name="parent_node">
46492</field>
</data>
</node>
