in reply to How to use select

Another way to do it using last.
for ($animal) { /camel/ and do Humps(2), last; /dromedary/ and do Humps(1), last; }
from "perl idioms" web page. Don't have the url but just google on my code.