Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2015-05-23 13:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (467 votes), past polls