>>>>> "pp" == philge philip <philg...@yahoo.com> writes:

  pp> is it possible to change values of my hash "%position_counts"
  pp> stored in the file without retrieving it back using "fd_retrieve"?

  pp> if its not possible can you tell me how to store a huge hash data
  pp> to a file or dbm and edit it without retrieving it back in
  pp> perl. Is "storable" module the best option?

storable uses a binary format which can't be edited. if you must edit
the data file outside a perl program you can use Data::Dumper which puts
out perl data structures. you need to be careful if you have a complex
structure which loops back and such. there are options to handle that
but they may make it harder to edit the data cleanly. you then read the
file back and run eval on it (or use do/require). it also depends on how
you write out the file itself. you may need to edit (in perl) the dumper
text to make it work in your context (package space, lexicals, etc.)

another alternative if your hash is simplistic is to use CSV or a DBD
that handles CSV or another text format.

uri

-- 
Uri Guttman  ------  u...@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to