Massyn has asked for the wisdom of the Perl Monks concerning the following question:
#!/fellow/monks.pl
Is there an easy way to convert a hash to a scalar, and back again? I'm busy writing a mean script to "encode" and "decode" a hash into a scalar variable. The idea is to have a hash table for a number of users, so I need to be able to convert a hash to a scalar and vice versa.
I would like to store and retrieve a hash within a mySQL database via DBI for each user who has a entry in the table. Thus I need to convert the hash to a scalar.
Thanks!
#!/massyn.pl
You never know important a backup is until the day you need it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hash to Scalar?
by fruiture (Curate) on Dec 09, 2002 at 12:09 UTC | |
|
Re: Hash to Scalar?
by bronto (Priest) on Dec 09, 2002 at 12:17 UTC | |
|
Re: Hash to Scalar?
by kabel (Chaplain) on Dec 09, 2002 at 12:23 UTC | |
|
Re: Hash to Scalar?
by ph0enix (Friar) on Dec 09, 2002 at 13:43 UTC | |
|
Re: Hash to Scalar?
by Theseus (Pilgrim) on Dec 09, 2002 at 14:24 UTC | |
|
Re: Hash to Scalar?
by tall_man (Parson) on Dec 09, 2002 at 20:35 UTC | |
|
Re: Hash to Scalar?
by grantm (Parson) on Dec 09, 2002 at 20:32 UTC |