Sure it's possible. I recommend taking a look at
perldsc for an overview of data structures in Perl. One thing to keep in mind is that your second-level hash doesn't need to be named, as it is contained in the outer hash and keyed on the filenames.
Per your example, you could do something like this (note that the
Spreadsheet::Read documentation states that
ReadData returns a
array reference, not a hash):
use Spreadsheet::Read;
my %H1;
my @filename_list = qw(D.xls E.xls);
for my $filename (@filename_list) {
$H1{$filename} = ReadData($filename);
}
my $example = $H1{'D.xls'}->[1]->{A1}; # $example now has the value of
+
# cell A1 of sheet 1 of D.xls