in reply to Unique character in a string?

If you want to determine if a given character is unique then you could use

if( $var =~ m[1] and $var !~ m[1.*1] ) { ## $var contains exactly one '1' character. }

Alternatively, if you want to know if the string contains no duplicates of any character then

if( $var !~ m[(.).*\1] ) { ## $var contains no duplicate characters }

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.