develooper Front page | perl.beginners | Postings from January 2002

Hash of hash of array

Thread Next
From:
Ahmed Moustafa
Date:
January 9, 2002 03:50
Subject:
Hash of hash of array
Message ID:
3C3BB4C5.5040603@arbornet.org
Hi All,

My data structure is a hash of a hash of an array. I build it from an 
input file by the following code. Could you help me write it back to an 
output file, please?

# Code Begins
%data = ( );
open (IN, "in.txt") || die;
while (<IN>) {
  chop;
  ($user_name, $file_name, $modified_by, $last_modified) = split ( " ", 
$_ );
  $data{$user_name}{$file_name} = [$modified_by, $last_modified];
}
close (IN);
# Code Ends

Thanks a lot for your attention. Your help will be appreciated so much.

Ahmed


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About