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
In reply to Writing Arrays to disk by shaolin_gungfu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |