Think about Loose Coupling | |
PerlMonks |
Re: Letter frequenciesby jeroenes (Priest) |
on Nov 24, 2000 at 14:54 UTC ( [id://43207]=note: print w/replies, xml ) | Need Help?? |
Just for fun, I want to post a script that does without
the loops. So with map/ no while or for. What do you think?
Well, I tested it, and this is the tail of the output, run with time perl .... (too lazy for benchmarking): And it looks to me like a 150kb file that has been counted in just 0.62 s. Looks pretty impressive to me. I don't consider myself to be a decent perl coder, so I would appreciate any comments to this.... Have fun, Jeroen I was dreaming of guitarnotes that would irritate an executive kind of guy (FZ) PP: I just took a .txt file, but it wasn't a text-file after all. Maybe some word (ugh!) document or whatever. Update Removed square brackets from tr///d, as pointed out by merlyn. And changed a funny typo (s/while/whole/). Justifies my remark on decent coding, I'm afraid :-<. Another update: added the total number.
In Section
Seekers of Perl Wisdom
|
|