my (%abs, %ilb); for my $lc ( Sql ( 'select blah blah1 - but just put a list of test va +lues will do' ) ) { my ( $ln, $pos, $key ) = split /\t/, $lc; $abs{ $key } = {}; # just want a hash reference for now } for my $lc ( Sql ( 'select blah blah2 - for testing: test values that +have an intersection with the first set' ) ) { my ( $ln, $pos, $key ) = split /\t/, $lc; $ilb{ $key } = { pos => $pos, abs => defined( $abs{ $key } ) }; # +this hash is about to get used immediately in the unwritten code to f +ollow }
The problem: Data::Dumper reveals at this point that in %ilb none of the abs subvalues are true. Unfortunately the obvious double loop to look for an intersection between the two sets of keys DOES find them at the same point in the code. The data returning from SQL is an irrelevant id followed by a relevant number followed by a relevant id separated by tabs - my own version uses the real SQL but if you are testing to see the problem you;d have to use test data. Any ideas what did I do wrong?

Update: Just one unusual factor to throw in detected so far - the perl version is v5.005__3

TIA, ^M

__________________________________________________________________________________

^M Free your mind!


In reply to putting the return value from defined for one hash as the value in another by Moron

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.