Welcome to the Monastery | |
PerlMonks |
[Perl6] Seq iterator already consumedby Athanasius (Archbishop) |
on Jun 17, 2019 at 02:09 UTC ( [id://11101451]=perlquestion: print w/replies, xml ) | Need Help?? |
Athanasius has asked for the wisdom of the Perl Monks concerning the following question: I only started learning Perl 6 within the last week, so please bear with me. :-) I had a script working nicely, then I added another statement (line D in the code below) and received a run-time error message like this:
From the documentation I gather that I have somehow created a Seq object and then attempted to iterate it a second time. But I don’t understand where or how the Seq object is being created and used. I managed to pare down the code to the following SSCCE:
Lines A, C, and D are all required to produce the error. Uncommenting line B removes the error (by caching, apparently, although I’m not sure exactly what is cached). So I have 3 questions:
In case it matters:
Thanks,
Back to
Seekers of Perl Wisdom
|
|