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

Hash of hash of array

Thread Next
Ahmed Moustafa
January 9, 2002 03:50
Hash of hash of array
Message ID:
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>) {
  ($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.


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About