Re: creating a hash list from arrays

2003-10-27 Thread Jeff 'japhy' Pinyan
On Oct 27, radhika sambamurti said: >As per the code below, I am trying to read from the database and put the >values into a hash list, so that I can retrieve the values later. I have >managed to put the values into arrays, but am not able to put them into a >hash. Any ideas how this can be done/i

Re: creating a hash list from arrays

2003-10-27 Thread radhika sambamurti
Hmmm, This did not work. my $count = keys %results_hash; gives me 0 And perl also complained that $results_hash had to be explicitly defined, so I had my $results_hash AND my %results_hash. This is not working. my hash is empty. Radhika On Mon, 27 Oct 2003 21:24:28 -0600 Daniel Staal <[EMAIL PR

Re: creating a hash list from arrays

2003-10-27 Thread Daniel Staal
--On Monday, October 27, 2003 21:22 -0600 Daniel Staal <[EMAIL PROTECTED]> wrote: my $results_hash; Sorry, correction. That should be: my %results_hash; while (my $res = $sth->fetchrow_hashref()) { push(@menu_id, $res->{"menu_item_number"}); push(@menu_desc, $res->{"description"}); $r

Re: creating a hash list from arrays

2003-10-27 Thread Daniel Staal
--On Monday, October 27, 2003 21:51 -0500 radhika sambamurti <[EMAIL PROTECTED]> wrote: Hi, As per the code below, I am trying to read from the database and put the values into a hash list, so that I can retrieve the values later. I have managed to put the values into arrays, but am not able to p

creating a hash list from arrays

2003-10-27 Thread radhika sambamurti
Hi, As per the code below, I am trying to read from the database and put the values into a hash list, so that I can retrieve the values later. I have managed to put the values into arrays, but am not able to put them into a hash. Any ideas how this can be done/improved? ###code below## while