Hi,

On Saturday 19 Jun 2010 12:56:36 philge philip wrote:
> hi
> 
> 
> in the below script:
> 
> use Storable qw(store_fd fd_retrieve);
> 

A few notes about your code. Please go over:

http://perl.net.au/wiki/Freenode_Sharp_Perl_FAQ

And:

http://www.perlfoundation.org/perl5/index.cgi?ancient_perl

You need to add strict and warnings and see below:

> my %position_counts = ('name' => 'rahul');
> 
> open(OUT1, ">temp.txt");
> 

That should be:

        open my $out1, ">", "temp.txt" or die "Cannot open 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"?

No.

> 
> 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?
> 

See:

http://perl.net.au/wiki/Freenode_Sharp_Perl_FAQ#How_can_I_store_Perl_Data_Structures_on_the_Hard_Disk.3F

Regards,

        Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Understand what Open Source is - http://shlom.in/oss-fs

God considered inflicting XSLT as the tenth plague of Egypt, but then
decided against it because he thought it would be too evil.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

-- 
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