Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Answer: How Do I Compare Array A to Array B, removing B elements from A.

by amitbhosale (Acolyte)
on Apr 09, 2008 at 07:39 UTC ( #679170=note: print w/replies, xml ) Need Help??


in reply to Re: How Do I Compare Array A to Array B, removing B elements from A.
in thread How Do I Compare Array A to Array B, removing B elements from A.


other strategy for above solution is.
@array_one = qw(one two three four); @array_two = qw(three four five six); %array_one = map {$_, 1} @array_one; @difference = grep {!$array_one {$_}} @array_two; print "@difference\n";
  • Comment on Re: Answer: How Do I Compare Array A to Array B, removing B elements from A.
  • Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2023-01-28 23:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?