foreach / forIterates over a list/range.Syntaxforeach my $x (items) { }Descriptionforeach loops through each element of an array. (1..5) generates a range.ExampleLoading editor…▶ Try it yourselfExpected output1 2 3When to use?List processing.Related commandswhile← if / elsif / elsewhile →