How to create a hash from database field?
How to create a hash from database field?
(OP)
I know how to access (open and close) my datafile, but I am not sure how to create a %hash from one of the fields.
My thoughts are: %hash{$list} = %hash{$list} + 1;
Where $list is the field in my data file and %hash is where I am storing all the variables. But this is not working.
My thoughts are: %hash{$list} = %hash{$list} + 1;
Where $list is the field in my data file and %hash is where I am storing all the variables. But this is not working.
RE: How to create a hash from database field?
Please note that your question has nothing with CGI. The adequate forum is forum219 ( Perl ).
Anyway, I did not understand too musc from your problem. Could you post a short sample from the data file and the code in which you read it and set $list ? And explaint abit more detailed what you want in %hash.
Feherke.
http://rootshell.be/~feherke/
RE: How to create a hash from database field?
HTH
--Paul
Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments