for($var){ when($_ eq 'b'){ ...;} # means if ($var eq 'b') { ... ; last} when($_ >'c'){...;} } # for