in reply to Short and easy way to write if...elsif syntax
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
|
|---|