The reason why I used 'for'instead of 'given' was because it was the first example in the documentation as mentioned in persyn, Switch statements. It says, I quote:
... The foreach is the non-experimental way to set a topicalizer. If you wish to use the highly experimental given , that could be written like this: ....
It was only after reading the specific page Switch that I realized that I was dealing with a masked loop statement. The perlsyn doesn't mention this behaviour or difference.
In reply to Re^2: using the feature 'switch' in loops
by martell
in thread using the feature 'switch' in loops
by martell
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |