in reply to DB Question

Just a quick note about reading from files. You can iterate through the array directly without the need for a separate looping and counter variable:
foreach (sort @list) { my ($one, $nochop) = split(/\|/, $_); chomp($one); # Remove any trailing linefeeds print "<option value='$one'>$one</option>"; }
I'm not sure what your $nochop variable is for, since it doesn't seem to be utilized. Further, you're closing FILE twice, which is irregular considering the first is sufficient.

I'd also like to throw in my obligatory nitpick about using ampersands in function calls. The first line could be sufficiently written as:
unless (open(FILE, "$catdir/categories.dat")) { error_message("Can't find data file - $catdir/categories.dat"); }
Usually, I would put a return call in the unless block because there's little point in displaying a page if there's no data to put in it.