<br><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><div><span class="q"><span class="gmail_quote">On 6/5/07, <b class="gmail_sendername">
Ted Fiedler</b> &lt;<a href="mailto:fiedlert@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">fiedlert@gmail.com</a>&gt; wrote:</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<span></span><div><div><br>I would just prepare and execute a statement... Then use a sub like this ( which returns a hash ) then compare the hashes.
</div></div></blockquote></span><div><br><br>I&#39;m going to have to digest this and get back to you. </div></div></blockquote><div><br><br>Ive been chewing on it for a year. Another thing I sometimes do depending on the size of the hash is to do md5 summing of the structure.
<br><br>get an md5 of the whole hash if thats different, get an md5 of each row ( by key ) if its the same move on, if the row md5 is different then I will actually compare the data. doing the check sums of the whole row is faster than comparing each value - mileage varies.
<br><br>so Ill have something that looks like this<br><br>%table1 = ( <br>&nbsp;&nbsp;&nbsp; key1 =&gt; ( md5sum =&gt; 123456,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data =&gt; [ x,x,y,c ] ),<br>&nbsp;&nbsp;&nbsp; key2 =&gt; ( md5sum =&gt; 124567,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data =&gt; [5,6,,d,NULL,2],
<br>);<br><br>next if&nbsp; ( $table1{key1}{md5sum} = $table2{key1}{md5sum} );<br><br>Then compare the data in the arrays...<br>&nbsp;<br>Ive seen some things that Ric has posted regarding Perl 5.10 that may make my life easier ie switch statement and given that Im pretty eager to try.
<br><br>Ted&nbsp; <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>--<br><br>Faber<br><br></div><br>
</blockquote></div><br><br clear="all"><br>-- <br>The optimist thinks that this is the best of all possible worlds,<br>and the pessimist knows it.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- J. Robert Oppenheimer, &quot;Bulletin of Atomic Scientists&quot;