Can you just do something like the following?
my @sqlarray;
foreach my $key (keys %hash)
{
push(@sqlarray,$key,$hash{$key});
}
my $sqlscalar = join("|",@sqlarray);
# ... database update
Then when you retrieve it from the database you can just use map to put the
hash back together.
-Pete
> -----Original Message-----
> From: Chris [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 02, 2005 10:31 AM
> To: perl-win32-users
> Subject: Store hash in SQL
>
>
> All,
>
> I'm looking for a way to store a large hash within an SQL
> field and recall
> it at a later time. I can't seem to find any modules that will convert
> hashes to text and back again, but have found plenty of XML
> modules that
> don't seem to work. Any ideas?
>
> - Chris
>
> _______________________________________________
> Perl-Win32-Users mailing list
> [email protected]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>
>
>
> __________________________________________________________
> This message was scanned by ATX
> 11:12:34 AM ET - 5/2/2005
>
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs