for (@array) { do {something($_)} if -1 != index( $_, 'bar'); } #### # . . . if m/foo|bar|baz/;