Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Count of words that match in an array

by songahji (Friar)
on May 09, 2005 at 18:00 UTC ( #455256=note: print w/replies, xml ) Need Help??


in reply to Count of words that match in an array

Get the intersection (on sets operation)
@Array1 = ("A", "B", "C", "D"); @Array2 = ("J", "C", "T", "A"); foreach $e (@Array1, @Array2) { $union{$e}++ && $intersect{$e}++ } @intersect = keys %intersect;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2022-08-08 22:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?