- or download this
my $c = '+000000';
print 'contains' if $c =~ /\+\d\d\d\d\d\d/;
- or download this
my $c = '+000000';
print 'contains' if $c =~ /\+\d{6}/;
- or download this
my $c = '+000000';
print 'contains' if $c =~ /^\+\d{6}$/;
# or...
print 'contains' if $c eq '+'.'0'x6;