Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: subtract one array from another

by demerphq (Chancellor)
on Oct 17, 2002 at 12:25 UTC ( #205999=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %hash;
    $hash{$_}=1 foreach @array_1;
    @array_2=grep($hash{$_},@array_2);
    
  2. or download this
    #for (my $search =0; $search<scalar @array1; $search++) # blech, this 
    +isnt C you know
    for my $search (0.. $#array1)                           # ahhh thats m
    +uch better
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://205999]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2017-08-18 16:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (306 votes). Check out past polls.

    Notices?