jason --   

you may be thinking of a nested hash.   see perlref and perlreftut in activestate docs.   

example:   

use warnings;
use strict;

my %hash = (  # nested hash
   H => { a => 1,     b => 2,   c => 3,  },
   I => { p => 'foo', q => 'bar',        },
   J => { x => 99,    y => 88,  z => 77, },
   );

for my $key1 (sort keys %hash) {  # access first level keys
   for my $key2 (sort keys %{$hash{$key1}}) {  # access second level keys
       print "$key1 $key2 $hash{$key1}{$key2} \n";
       }
   print "------ \n";
   }

(other possibility is you may be thinking of slices.   see perldata doc.)

bill   
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to