Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Unable to Understand grep and hash use for prime no.

by vinoth.ree (Monsignor)
on Aug 04, 2015 at 04:48 UTC ( [id://1137331]=note: print w/replies, xml ) Need Help??


in reply to Unable to Understand grep and hash use for prime no.

what you did not understand from the above code ?

Don't you know exists $is_prime{$_} part checks whether a key exists in a hash or not.

Don't you know $is_prime{$_} checks a value with the key in hash is true.(assuming your is_prime() function Boolean value(True or False))


All is well. I learn by answering your questions...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-25 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found