for (@items) { when (/^[A-Z]/) { say "Found a proper noun? $_"; } when (/[,.]/) { say "This word has punctuation: $_"; } say "This word seems uninteresting: $_"; }
In reply to Re^2: Perl 5.10: switch statement demo
by robin
in thread Perl 5.10: switch statement demo
by talexb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |