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))
In reply to Re: Unable to Understand grep and hash use for prime no.
by vinoth.ree
in thread Unable to Understand grep and hash use for prime no.
by shankonit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |