Thanks janharders--I got the cookies writing in both Firefox and Opera now. Can't get them in IE though. Is there something like HTTP Headers for IE. The re-direct I'll be using is semi-manual-that is, after the cookie is written a sub routine will be called which will display a link on the screen with the word Continue and that goes to page with a redirect-that way the cookie info needed will be available. Only takes an extra click and its for an admin panel that I'll be the one mostly using so that's no problem-that is another project.
Also, I changed the method for getting the info from the database:
my $dbh = DBI->connect('connection paramaters') or die("Couldnt connect");
my $query = "select blah1,blah2,blah3" . " from table where binary column_name = '$_' limit 1";
($value1,$value2,$value3) = $dbh->selectrow_array($query);
my $query = new CGI;
my $cookie = $query->cookie(-name=>'oreo',
-expires=>'',#when the browser closes