foreach foreach $var (@list) { ; ; } Executes the statements for each element of the list. That means, in each iteration $var will be set to another element.