[Israel.pm] how to read a file to a Hash?

HeziGolan ketem95 at 013.net.il
Thu Jul 8 09:58:25 PDT 2004


Use Data::Dumper;

#write 
open SAVE, ">foo.file" || die '';
print SAVE Dumper($hashref);
Close SAVE;




-----Original Message-----
From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On
Behalf Of ליאת
Sent: Thursday, July 08, 2004 5:43 PM
To: perl at perl.org.il
Subject: [Israel.pm] how to read a file to a Hash?


hellow,
i need help plz.
i'm working on a client-server project.
i need to read data from a File to the socket (on the server side)  that
need to be read to hash variable (on the client side) my problem is how
to save the data in the file? how to organized it? for example:

my $hash = {
                "family" => {
                        "husband" => {
                                "x1" => 'y1',
                                "x2" => 'y2',
                        } ,
                        "wife" => {
                                "x3" => 'y3',
                                "x4" => 'y4',
                        } ,

                                         {
                  {

to save this data in a file that supposed to get the client in a hash
variable looks like that.


thanks
בתודה מראש
liat


_______________________________________________
Perl mailing list
Perl at perl.org.il
http://perl.org.il/mailman/listinfo/perl





More information about the Perl mailing list