In this chapter, we will be talking about the main elements in controlling the flow of programs in Perl 6. Most programs are not just a list of instructions, but they should rather react to user input, take decisions based on calculated data, and so on.
In this chapter, we will cover the following topics:
- Code blocks and the do keyword
- Conditional checks
- Loops
- Breaking the loop body
- Collecting data using gather and take
- Setting the topic
- Executing code only once