If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Perl and the DBI > Hash value is storing in DATABASE from perl

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-03-11, 10:26
praveen_bdforums praveen_bdforums is offline
Registered User
 
Join Date: Sep 2011
Posts: 1
Red face Hash value is storing in DATABASE from perl

hai,

I wrote code in perl and linked with database.my aim is to store the output of perl in database mysql.But Hash value is storing in the database.can u tell me how to solve it.
Reply With Quote
  #2 (permalink)  
Old 03-27-12, 10:31
epement epement is offline
Registered User
 
Join Date: Mar 2012
Posts: 11
Quote:
Originally Posted by praveen_bdforums View Post
I wrote code in perl and linked with database.my aim is to store the output of perl in database mysql.But Hash value is storing in the database.can u tell me how to solve it.
I know that this is an old question, but for the sake of others who might read this, the user is probably seeing something like "HASH(0x822cd40)" stored in the database field, rather than the data that was expected.

This was very probably caused by the fact that a hash reference, like $thisvar, was stored in the field. That reference should have been "dereferenced" before being stored in the database. This would store the value, rather than a transient memory location. In short, instead of storing $thisvar (which turns out to be a hash reference on examination), they should have stored $thisvar->{key} instead.

Hope this helps.
Reply With Quote
Reply

Tags
dbi, mysql, perl

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On