Solved

"Freezing" a PERL object and saving it in a database

Posted on 2007-11-15
1
247 Views
Last Modified: 2013-12-25
I'd like to be able to save a PERL object in a mysql database, then retrieve it later on and use it as an actual PERL object.  I looked at "Storable" but couldn't make sense of it. Could someone post some sample code to freeze a PERL object, add it to a mysql table, then retrieve & thaw it?

Thanks!
0
Comment
Question by:zumpoof
1 Comment
 
LVL 51

Accepted Solution

by:
ahoffmann earned 500 total points
ID: 20297770
perl -MStorable -le '%x=("a"=>"aa","b"=>"bb");store(\%x,"file");'
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question