Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Count of words that match in an array

by simmisam (Novice)
on Jan 15, 2014 at 07:10 UTC ( [id://1070655]=note: print w/replies, xml ) Need Help??


in reply to Count of words that match in an array

my @Array1 = qw( A B C D ); my @Array2 = qw( J C T A ); my $count=0; for ( @Array1 ) { $count++ if $_ ~~ @Array2; } print "Count = $count\n";

Replies are listed 'Best First'.
Re: Answer: Count of words that match in an array
by kcott (Archbishop) on Jan 15, 2014 at 09:29 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2026-03-12 08:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.