in reply to Having problems using eval()

Rather than reinventing the wheel, I would recommend you investigate the FreezeThaw module. It does exactly what you require.

Replies are listed 'Best First'.
Re: Re: Having problems using eval()
by eric256 (Parson) on May 21, 2004 at 04:31 UTC
    Using Data::Dumper for data storage is hardly reinventing the wheel. Its very usefull when you want to be able to actualy see the data and manipulate it by hand.

    ___________
    Eric Hodges

      You are absolutely correct, except the OP stated that they used Data::Dumper to convert their hash into a scalar to store it in a database record, and then wanted to turn the scalar back into the hash. It does not appear that the OP wanted to see or manipulate the data beyond converting to and from a database back-end. For this purpose, using FreezeThaw would be a better choice rather than hand rolling your own solution.

      Thank you for your comment though! More points of view are always helpful.