in reply to Re^2: Learning about hashes
in thread Learning about hashes

my %eslist = $record[3];
That code declares a hash variable (using my) and assigns a single scalar value to the hash. In the words of diagnostics
(W) You specified an odd number of elements to initialize a hash, which is odd, because hashes come in key/value pairs.
What is in $record[3]? What other data do you want to associate with $record[3]? If you show us a small sample of data, we could probably suggest how you might store the data in a hash.

Give perldata a quick read.

Replies are listed 'Best First'.
Re^4: Learning about hashes
by molson (Acolyte) on Oct 16, 2009 at 16:16 UTC
    record[3] is a bunch of numbers. I'm trying to find all unique entries. From what I've read a hash is the best way to do this, but I'm having trouble understanding how to assign a key to the record[3] value. Is a key like a primary key in a database? Where it is essentially a arbitrary unique number used to refer to the entry?