Latnam has asked for the wisdom of the Perl Monks concerning the following question:
print "Enter an input string: "; chomp (my $str = <STDIN>); print "Input String: $str\n"; my $cnt = @{[$str =~ /./sg]}; print "Total characters (including spaces & punctuation): $cnt\n"; print "Unique Characters (including spaces & punctuation): \n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unique Character
by Kenosis (Priest) on Feb 01, 2014 at 19:31 UTC | |
|
Re: Unique Character
by davido (Cardinal) on Feb 01, 2014 at 22:18 UTC | |
|
Re: Unique Character
by Laurent_R (Canon) on Feb 01, 2014 at 20:08 UTC | |
by Kenosis (Priest) on Feb 01, 2014 at 20:10 UTC | |
|
Re: Unique Character
by ww (Archbishop) on Feb 02, 2014 at 00:11 UTC | |
by Latnam (Novice) on Feb 02, 2014 at 03:42 UTC | |
by CountZero (Bishop) on Feb 02, 2014 at 08:55 UTC |