- or download this
use strict;
use warnings;
...
print qq{"$ch" Unique in "$str"\n}
if $str !~ m{($ch)(?=.*\1)};
}
- or download this
"a" Unique in "abcdceefghfty"
"b" Unique in "abcdceefghfty"
"d" Unique in "abcdceefghfty"
"g" Unique in "abcdceefghfty"
- or download this
use strict;
use warnings;
...
print qq{"$ch" unique in "$str"\n}
if $str =~ $rxUniq;
}