I saw this posted as a question in another forum, and thought that it would make for a fun round of perl golf here.

This was the original poster description of his problem ( a snippet anyways ):

Quote

from the command line :

./script.pl this is a test

output: t:3 h:1 i:2 s:3 a:1 e:1

From this I define the course: code must produce a character:count (new line delimited) output for each unique character present in the argument string. Output doesn't have to be in any particular order, but it's cooler if it's "in order" in relation to the original arg string. And even though the example above doesn't count spaces, I'd be curious to see two different versions of the code. For me it was the difference of using a join() or not. So there are two holes here: Version with spaces, and version that doesn't count spaces. Alright... have fun.

I am interested in doing some Perl golf, and I thought this challenge looked interesting. Then I made the mistake at looking at your awesome solution. I am still new to Perl, but I really enjoy it. There is no way I could have come up with a solution that short.

Being new to Perl, I don't understand how your solution works. I run it on my computer, and sure enough, it worked, but I want to know how. I know this is an old thread, but is there someone who can disect Coderifous' entry step by step for me?