shaolin_gungfu has asked for the wisdom of the Perl Monks concerning the following question:
Hi fellow Monks,
Before I say anything I should say i'm pretty new to Perl, so sorry if this is a stupid question:-)
I wrote a message a little earlier about writing a normal perl array to disk, in the same way as the old dbmhash thing did for hashes. I got messages back telling me about tie() and storage.pm and i've looked at these all afternoon, but even after reading loadsa man pages and tutorials I just can't get anything to work. I'm using Activestate perl and it just complains about wrong versions when I try using storage.pm and I don't know anything about creating packages for the tie() thing.
I'm developing a web spider, at the moment my program keeps the list of URLs to visit in an array. I would simply like to store these values on disk so if my spider crashes I don't loose my list of URLs to visit, and I can carry on where my robot left off.
Any idea what the best way of doing this is? I could just keeping opening and closing file handles and writing to a normal text file, but that seems a bit slow and dodgy to me. I thought about using the dbmhash thing, but I know that's deprecated. Anyway, any code examples would be really appreciated.
Many thanks once again, Tom
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Writing Arrays to disk
by samtregar (Abbot) on Apr 16, 2002 at 23:26 UTC | |
by shaolin_gungfu (Novice) on Apr 16, 2002 at 23:34 UTC | |
|
Re: Writing Arrays to disk
by rbc (Curate) on Apr 16, 2002 at 23:07 UTC | |
|
Re: Writing Arrays to disk
by DaWolf (Curate) on Apr 17, 2002 at 01:59 UTC | |
|
Re: Writing Arrays to disk
by JayBonci (Curate) on Apr 17, 2002 at 16:03 UTC |