in reply to Win32::ODBC results in hash

What is Client_ID? The key? If it's a variable, it's missing its prefix ($, @, etc).

Hashes are assigned data in many ways:
%hash{$key} = $value; or %hash = ( $key => $value); another one: %hash = ('$key1','$value1','$key2','$value2');
Notice that the first one uses curly braces {}, but the second and third ones use standard parens.

Update: fixed typos... long day!

Replies are listed 'Best First'.
Re^2: Win32::ODBC results in hash
by drodinthe559 (Monk) on Mar 22, 2010 at 19:19 UTC
    Client_ID is the field I want to use as the key.
      In that case you'd want to do something like this:
      %hash{"Client_ID"} = $dataRow;
      This will store the value of $dataRow into %hash, with the index (key) being the string "Client_ID".

      I highly recommend getting Data::Dumper from CPAN so you can dump your data structure to a scalar and print it. It makes it very easy to see when you've done something wrong, and for being new to hashes, I think it's a great tool. I use it all the time.