So far, Coro implements that, but not for Win32/MSVC, and it is not that stable. Also, the libcoro that Coro uses is under the GPL, which prohibits its distribution with the Perl core.

Lightweight threads that have the approach of "share everything" instead of the "share nothing" approach taken by Perl so far. There is Thread::Sociable, which implements that, but so far, the approach to Perl threads has been, different. All threading is problematic in Perl because of the semantics of the really global stuff, like the namespace - if you have a "share everything" approach, you need to protect %:: and everything hanging off there, or the following code will behave unpredictable:

$line should be returned as a tie'd variable and the read request
should be run in the background, allowing the foreground program to continue. Any access to $line will then wait until the background read operation has completed.

Update:Upon rereading, I don't need the :Generator syntax on my generators. Just using the yield keyword (similar to return but remember all state so we know where to continue when we get called again) is enough.

Iterators/generators allow you to conveniently program in a linear fashion without needing to maintain the state. For example this contrived example is far easier to write in a linear fashion than it is in a closure fashion, because you need to store the current point of execution:

With this the intent would be clear. And you would be able to specify exactly what do you want. I'm not talking about the implementation of upto(), I'm talking about its use! In the example I gave you, with the two nested loops, are the two upto(5) things the same iterator or two separate ones? If they are separate then how come you apparently assume the get_commands() to be a single iterator? And if it's the same iterator, how do I create a separate one?

Imagine you wanted to make the get_commands() more general and allow you to read the commands from a file specified by the filename. Now am I supposed to pass the same filename to all occurences of the get_commands()? Or just the first and all following will use that file? How will I know they are not trying to access the <>? And how do I open two iterators at once?

The thing that is still missing in the Perl core for me is more flow control resp. non-linear flow:

One thing that I miss both in Perl 5, 6 and most languages I know of is some form of addomesticated code rewriting. We're all told that goto is evil. But we have some forms of addomesticated goto: next, last and redo, which are not evil. We're all told that code rewriting is evil. But I'm sure that there could be useful and not evil forms of code rewriting. Limbic~Region speaks about that in Doing "it" only once.