Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by 1nickt (Canon)
on Aug 04, 2015 at 05:01 UTC ( [id://1137333]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    Evaluates the BLOCK or EXPR for each element of LIST (locally
                setting $_ to each element) and returns the list value con
    +sisting
    ...
                scalar context, returns the number of times the expression
    + was
                true.
    
  2. or download this
    {
      ( exists $is_prime{$_} and $is_prime{$_} )
      or 
      ( $is_prime{$_} = is_prime($_) )
    }
    
  3. or download this
    exists $is_prime{$_}
    
  4. or download this
    and $is_prime{$_}
    
  5. or download this
    is_prime($_)
    
  6. or download this
    $is_prime{$_} =
    # the assigned value is the result of is_prime($_) if that function re
    +turned true
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-24 22:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found