spickles has asked for the wisdom of the Perl Monks concerning the following question:
I've taken a look at all of the postings for this error on Perl Monks, and I still didn't get an answer to my situation. The error is understandable. What I don't understand is what I can do to fix it. The hash I'm referencing is a query to a MySQL database. I am using fetchall_hashref to get the results and create the hash. The problem is that no matter what column I use as the 'key' to the hash, none of the values in the database are anything but strings. I thought it would be best to key the hash using the key of the MySQL table, but the key is 'id' and the values are incrementing numbers. Despite this, the error still reports those hash keys as strings. Does this have something to do with the fetchall_hashref? Should I use something other than fetchall_hashref, or is there a way to ensure that when the hash is built they are of type 'HASH' and not strings?
Regards,
Scott
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: can't use string as hash ref
by ikegami (Patriarch) on Oct 25, 2010 at 03:39 UTC | |
|
Re: can't use string as hash ref
by kcott (Archbishop) on Oct 25, 2010 at 05:33 UTC | |
|
Re: can't use string as hash ref
by aquarium (Curate) on Oct 25, 2010 at 04:39 UTC | |
by chromatic (Archbishop) on Oct 25, 2010 at 19:37 UTC | |
|
Re: can't use string as hash ref
by zentara (Cardinal) on Oct 25, 2010 at 11:18 UTC | |
by morgon (Priest) on Oct 26, 2010 at 02:56 UTC | |
by andal (Hermit) on Oct 26, 2010 at 09:54 UTC | |
by Anonymous Monk on Oct 25, 2010 at 12:30 UTC | |
by spickles (Scribe) on Oct 25, 2010 at 15:46 UTC |