Although the $bulk->LIST() can effectively accept a code-reference as a parameter, it won't work well in this context. To extend the previous comment, I would re-factor to the following logic, avoiding the code-ref and replacing with an array ref:
... $bulk->LIST( $dbh->fetchall_arrayref() ); $dbh->rollback(); # Not necessary, but I like to do it $dbh->disconnect(); # Look below for more detail ...
Technically, DBI will automatically rollback and disconnect via the DESTROY method, however there are the potential for warnings if you let DBI handle it, so it's always nice to do it your self.

Overall, this should not only fix your problem, but it shoudl also set the entire list of e-mail addresses in your database to the LIST attribute.

---hA||ta----
print map{$_.' '}grep{/\w+/}@{[reverse(qw{Perl Code})]} or die while ( 'trying' );

In reply to Re: DBI Driven MLM by wazzuteke
in thread DBI Driven MLM by Cappadonna3030

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.