in reply to Separating arrays for column search results

Well, what does your data look like? If you give us the data and the requirements, we can tell you how to write the code. But if you just post code, all we can really do is critique it.

You mentioned an HTML template ... are you using HTML::Template or Template Toolki? Or are you rolling your own? You say you are searching 2 flat files. How is the data delimited? By spaces? Have you ever heard of DBD::CSV or DBD::AnyDATA? They can ease searching. I prefer to store data in a Relation Database like MySQL or Postgres.

This snippet of code:

$resultline[$rcc] = $row[0] . "\t" . $row[1] . "\t" . $row[2] . "\t" . $row[3] . "\t" . $row[4] . "\t" . $row[5] . "\t" . $row[6] . "\t" . $row[7] . "\t" . $row[8] . "\t" . $kinclude . "\n";
Can be rewritten consisely and maintainably as:
$resultline[$rcc] = join("\t", @row[0..8]) . "$kinclude\n";

We would love to help you more, but you really should Clean your room first.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)