in reply to Perl - Unique Numbers
I do not usually critique the answers of other monks ( unless I think it is wrong :-), since thanks to Perl we have many ways of doing the same thing. When I stated 'OP', I was referring to:
My confusion is that johngg was critiquing my answer to the Original Poster (OP) and I didn't even look at the answer johngg supplied. When I used the word 'trivial', I was referring to the OP's problem and script and not to any monk's comments.OP Original Poster The author of the top level node of the thread in which it appears.
As for my use of 'exists', I benchmarked on Perl 5.12.2 that 'exists' was faster at checking keys than working on the values of the keys ( $h{$key}++; ). In johngg script, the way he uses the incrementing in his script, it may be faster.
Let's not have a flame war over my mis-understanding!
Best Regards...Ed
"Well done is better than well said." - Benjamin Franklin
|
---|
In Section
Seekers of Perl Wisdom