philge philip wrote:
hi
Hello,
in the below script: use Storable qw(store_fd fd_retrieve); my %position_counts = ('name' => 'rahul'); open(OUT1, ">temp.txt"); store_fd(\%position_counts, *OUT1) || die "can't store to temp.txt\n"; close(OUT1); is it possible to change values of my hash "%position_counts" stored in the file without retrieving it back using "fd_retrieve"? if its not possible can you tell me how to store a huge hash data to a file or dbm and edit it without retrieving it back in perl. Is "storable" module the best option?
As long as the hash values are simple scalars and not references or filehandles then you could use one of the DB modules:
perldoc DB_File perldoc GDBM_File perldoc NDBM_File perldoc ODBM_File perldoc SDBM_File perldoc perldbmfilter John -- Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction. -- Albert Einstein -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/