Hey everyone, So check this out:
use HTTP::Async; my $async = HTTP::Async->new; # create some requests and add them to the queue. $async->add( HTTP::Request->new( GET => 'http://www.perl.org/' + ) ); $async->add( HTTP::Request->new( GET => 'http://www.ecclestoad.co. +uk/' ) ); while ( my $response = $async->wait_for_next_response ) { # Do some processing with $response }
When I put a nested array in that last while loop, assign the response/ID to that array, and grab data out of that nested array in the rest of the code (outside the loop (dbi code BTW)), it works. It's slow, but it works. When I put that same DBI code in that loop, the response data gets all jumbled up. Is there anything in how HTTP::Async works that would make what I'm trying to do impossible? Or am I just messing something up. I don't get why a simple nested array would work, but when I put my code in there --the same code that originally referenced data in that array -- with the appropriate modifications the responses get all jumbled up. Any ideas? -S Thinking my dbi code, which inserts rows using data stored in strings, is getting passed over more than once simulteneously. So therefore string values are getting poisoned by other string values. I just don't really know how to prove that, or fix it. Any ideas? -S

In reply to HTTP:Async weirdness by schnibitz

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.