Hello,
I have a question that I hope that you good people can help me with. In my script I am pulling a list of categories from a data file for use in a flat db file.
open(FILE, "$catdir/categories.dat") || &error_message("Can't fin
+d data file - $catdir/categories.dat.");
@list = <FILE>;
close(FILE);
@list= sort(@list);
$numlist = @list;
print "<select size=1 name='catlisting'>";
for ($a = 0; $a < $numlist; $a ++)
{
($one, $nochop) = split(/\|/, $list[$a]);
print "<option value='$one'>$one</option>";
}
print "</select>";
close(FILE);
Dat File:
Categories
Accounting
Attorneys
Automobile-Sales
Automobile-Services
Banks
Everything works fine until it gets added to the flat data file. Anything following the "catlisting" get sent to the next line. Any suggestions?
thanks,
lis