my @libs = qw{1 2 3 4}; foreach my $lib (@libs) { my $file = $lib{'file'}; print "reading $file\n"; }