Just can't make this array comparison work



This is programming 101, but darned if I don't keep making arrors that
flummox me (my excuse: I am brand new to Perl). I have two arrays, A
and B. A is vastly larger than B (~30000 elements to B's ~1000) but
some of the elements in A are identical to those in B (~1000 of them
actually). I want to loop thorugh A and throw out everything in the
array so that in the end A=B. The two arrays are sorted. The valuse
being compared are of the form aaaaaaa so that at some point any given
value out of A that is being checked against those in B will be <= to
the remainder of the values (not yet checked) in B.

.



Relevant Pages

  • Re: Idiom for array index that Im foreaching over?
    ... >>you'll find that you rarely want to loop over an index. ... With hashes, indexed access, and hence loops ... > simplicity and elegance that I expect out of good modern Perl ... If, for some reason, the data is given in individual arrays, there are ...
    (comp.lang.perl.misc)
  • Re: Fw: question
    ... As a matter of fact Perl has: ... With the above functions and arrays and hashes there are very few data ... Also, PHP is a very different language then Perl, remember that. ... What happens if I add or remove keys from a hash while iterating over it? ...
    (perl.beginners)
  • Re: combining hashes
    ... in c they are much slower than arrays since you need to do ... The difference is that, unlike Perl, C doesn't have ... please don't tell me how to do searching in c. i was doing that in PL/I ... c's arrays are vs all string lookups. ...
    (comp.lang.perl.misc)
  • Re: SET Operations in Perl
    ... Those are good if you have sets in arrays. ... But if you have to store sets in Perl then arrays are not the natural type. ... Some what one usually thinks of as the primative set operations are not ... primative in this implementation but the primatives you do have are ...
    (comp.lang.perl.misc)
  • Re: delimited data into nested array
    ... > Perl as a two dimensional nested array. ... Do you have a good reason for reading the file into an array ... If you'd still like to use the arrays, read up on perllol and use this: ... This whole loop was condensed above by using join, $\, and that handy ...
    (comp.lang.perl.misc)