for ($given){ print "\nFOR($_):"; if (/abc/) { print "abc"} if (/def/) { print "def" ;next} if (/xyz/) { print "xyz" ;next} print "default"; }
more examples at Understanding the benefit of Given/When ...
Cheers Rolf
In reply to Re: Short and easy way to write if...elsif syntax
by LanX
in thread Short and easy way to write if...elsif syntax
by slayedbylucifer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |