This use of 'for' is unusual, but early perl's did not really have a switch/case statement. Nowadays we would use
.
The 'for' loop loops over each item in its list (the variables inside parentheses). In each for loop there is only one item in the list, so they would only go through one iteration.