in reply to Re^5: Golf: Improve this guy's fail . . . please!
in thread Golf: Improve this guy's fail . . . please!
my %letters;
$letters{$_}++ for grep /\w/, split //, $input;
That would be simpler as:
my %letters;
$letters{$_}++ for $input =~ /\w/g;
|
---|