- or download this
#!/usr/bin/env perl
...
my ($str, $exp) = @$test;
is length($str) == uniqstr(split //, $str), !!$exp;
}
- or download this
$ ./pm_11146148_uniq_str_chars.pl
1..4
...
ok 2
ok 3
ok 4
- or download this
#!/usr/bin/env perl
...
my @tmpl_chars = grep exists $tmpls{$_}, @chars;
is 0+@tmpl_chars == uniqstr(@tmpl_chars), !!$exp;
}
- or download this
$ ./pm_11146148_uniq_str_chars_2.pl
1..6
...
ok 4
ok 5
ok 6