my $inqueueref = shift; my $outqueueref = shift; my %inhash; while (%inhash = $inqueueref->dequeue) { #create one or more new anonymous hashes and $outqueue->enqueue(\%outhash) }