INFORMATION ^

This is an advanced example.

It uses a file stream (Stream::ParrotIO) that is processed linewise with Stream::Lines. A counter stream creates line numbers, both are combined to one stream and then dumped.

FUNCTIONS ^

_main

Opens this file (or the one specified at the command line) and creates a lines stream for it. Then it combines the stream with a stream providing line numbers.

_counter

This sub is the source of the counter stream. It just endlessly writes line numbers followed by a space to its stream.

AUTHOR ^

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 ^

Copyright (C) 2004-2008, The Perl Foundation.


parrot