We agree that there are 19 characters in the string... but your definition/usage of "unique" is indeed made very fuzzy when you say "I should get 19 characters total with 3 unique characters." I don't see how you get there:
arabic digit indicates instance of a char' "x" indicates no repetition/dupe (6); and roman numerals indicate distinct repeated chars (VI) AT THE FIRST +REPEAT my $str = "PERL MONKS ROCKS!!!"; P 1 x E 1 x R 1 I L 1 x 1 repeated later M 1 x O 1 repeated later N 1 x K 1 repeated later S 1 repeated later 2 II R 2 I O 2 III C 1 X K 2 IV S 2 V ! 1 VI ! 2 VI ! 3 VI
In reply to Re: Unique Character
by ww
in thread Unique Character
by Latnam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |