Re: Pring array into a text file
From: toylet (toylet_at_mail.hongkong.com)
Date: 02/19/04
- Next message: Doug Nichols: "Inheritence question"
- Previous message: toylet: "trapping file i/o error"
- In reply to: Maximus: "Re: Pring array into a text file"
- Next in thread: nobull_at_mail.com: "Re: Pring array into a text file"
- Reply: nobull_at_mail.com: "Re: Pring array into a text file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 19 Feb 2004 17:07:35 +0800
how could yOu read them from file.txt and store in memory again?
is there a binary format for hash?
> my %hash = ( key1 => 'value1',
> key2 => 'value2',
> key3 => 'value3',
> key4 => 'value4');
>
> open OUT," > file.txt" or die "$!\n";
>
> while (my ($key, $value) = each %hash) {
> print OUT "Key: $key , Value: $value\n";
> }
> close OUT;
> Enough ?
-- .~. Might, Courage, Vision. In Linux We Trust. / v \ http://www.linux-sxs.org /( _ )\ Linux 2.4.22-xfs ^ ^ 5:06pm up 2 days 19:00 load average: 1.00 1.08 1.05
- Next message: Doug Nichols: "Inheritence question"
- Previous message: toylet: "trapping file i/o error"
- In reply to: Maximus: "Re: Pring array into a text file"
- Next in thread: nobull_at_mail.com: "Re: Pring array into a text file"
- Reply: nobull_at_mail.com: "Re: Pring array into a text file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|