in reply to How to check if a string contains more than 1 character?

Or do you mean two or more different characters?

use strict; use warnings; my @strings = qw/xxxx xxxyy/; for( @strings ) { print "$_\n" unless /^(.)\1*$/; }