Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Perl - Unique Numbers

by flexvault (Monsignor)
on Oct 19, 2015 at 13:58 UTC ( #1145323=note: print w/replies, xml ) Need Help??


in reply to Perl - Unique Numbers

Dear johngg and dsheroh,

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:

OP Original Poster The author of the top level node of the thread in which it appears.
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.

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1145323]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2022-01-18 20:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (54 votes). Check out past polls.

    Notices?