http://www.perlmonks.org?node_id=11128228


in reply to AnyEvent - sequence of async operations without recursion?

AnyEvent and its ecosystem are outside my area of expertise, but ...

If the original question is really about tail recursion, the way to do that in Perl is goto &DoQueue;. The gone-to subroutine receives as its arguments whatever was in @_ at the time the goto is executed.