|Contents | Examples|
This example shows the usage of
It uses two Stream::Sub, one sub generates an endless stream of line numbers, the other writes just a few lines.
The Stream::Combiner combines both streams line by line. We specify our own combiner sub that concatenates the strings read from both streams together, seperated by a space.
If you specify no combiner sub,
a default one will be used that just concatenates both strings.
If the _counter sub would add a space after the number,
we could use the default combiner (by not calling the
readmethod of the Combiner stream.
Jens Rieks <parrot at jensbeimsurfen dot de> is the author and maintainer. Please send patches and suggestions to the Perl 6 Internals mailing list.
Copyright (c) 2004, the Perl Foundation.