in reply to Re^3: Return 2 arrays, sort the same, and concatenate them
in thread Return 2 arrays, sort the same, and concatenate them
Okay, it might be that I am returning in that loop, so the matches aren't being kept! How do I prevent the matches that the condition is true for from getting to @all_matches but reaching @all_pronoun_matches?
I have tried removing the "return" and putting the @all_matches push statements in else, of the foreach. This didn't work:
It just sorted as if there were no condition statement to separate them. Like everything went into @all_matches
For clarity, this is the output I'm looking for:
2 match(es) in which the subject of move is animals : Section 1_1: Radially symmetrical animals move slowly or not at all . Section 1_1: Cnidarians also have epithelial cells with muscle fibers whose contractions enable the animals to move , as well as nerve nets that integrate their body activities . 1 match(es) in which the subject of move is cavity : Section 1_1: Flatworms -LRB- phylum Platyhelminthes -RRB- have no body cavity , lack organs for oxygen transport , have only one entrance to the gut , and move by beating their cilia . 2 match(es) in which the subject of move is they : Section 1_1: Others , the sea butterflies and heteropods , have a modified foot that functions as a swimming organ with which they move through open ocean waters . Section 1_1: Because fluids are relatively incompressible , they move to another part of the cavity when muscles surrounding them contract .
Even with another heading: "Here are the pronouns:" before "they" shows up.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Return 2 arrays, sort the same, and concatenate them
by Anonymous Monk on Jul 01, 2011 at 16:39 UTC | |
|
Re^5: Return 2 arrays, sort the same, and concatenate them
by Anonymous Monk on Jul 04, 2011 at 08:13 UTC | |
by Anonymous Monk on Jul 04, 2011 at 08:28 UTC | |
by jonc (Beadle) on Jul 04, 2011 at 14:13 UTC | |
by Anonymous Monk on Jul 05, 2011 at 11:51 UTC |