Skip to content

Instantly share code, notes, and snippets.

@dann
Created August 7, 2008 18:35
Show Gist options
  • Select an option

  • Save dann/4463 to your computer and use it in GitHub Desktop.

Select an option

Save dann/4463 to your computer and use it in GitHub Desktop.
my @results = ();
while ( my ($response, $id) = $async->wait_for_next_response ) {
warn "Getting $id";
push @results, +{ id => $id, content => $self->parser->parse( $response->content) };
}
my @sorted_results = sort { $a->{"id"} cmp $b->{"id"} } @results;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment