in reply to All files in dir to Storable.pm data
instead of this:$essays{'Emerson'} = "/usr/foo/american_lit/emerson/";
This goes on for several pages. Obviously, the second way will create a bigger hash, but it's also much more portable as I just have to copy the file created by storable to have ALL the essays I've stored. This seems to be what you did in your post. And you mentioned putting the data from THOUSANDS of files into a stored hash. Can I do this with lock_store and lock_retrieve? Doesn't that mean that when you lock_retrieve that stored file you'll be reading EVERYTHING in memory? That can't be good, can it? The problem I'm having with the path solution is portability across different machines.$essays{'Emerson'} = "The American Scholar from Addresses, published as part of Nature; Addresses and Lectures by Ralph Waldo Emerson An Oration delivered before the Phi Beta Kappa Society, at Cambridge, +August 31, 1837 Mr. President and Gentlemen, I greet you on the re-commencement of our literary year. Our anniversa +ry is one of hope, and, perhaps, not enough of labor. We do not meet for games o +f strength or skill, for the recitation of histories, tragedies, and ode +s, like the ancient Greeks; for parliaments of love and poesy, like the Trouba +dours; nor for the advancement of science, like our contemporaries in the Bri +tish and European capitals. Thus far, our holiday has been simply a friendly si +gn of the survival of the love of letters amongst a people too busy to give to l +etters any more. As such, it is precious as the sign of an indestructible ins +tinct. announce, shall one day be the pole-star for a thousand years?... etc. +";
|
|---|