$stops = join( '', @noise ); # should use ' ' (space) on the join ... if ( $stops !~ /$_/i) { # regex should be /\b$_\b/ ...