sub GetDFSdata {
#...
#Get the list of file names and indexes
my $name;
while(<$IN>){
chomp;
next if /^operator/;
#...etc.
if (m/$start/) {
$name = $1;
} elsif (m/^record size:\s+\d+/) {
$Hash{$name}{'record_size'} = $_;
} elsif (m/^last record:\s+\d+/){
$Hash{$name}{'last_record'} = $_;
} elsif (m/^data byte count:\s+\d+/) {
$Hash{$name}{'data_byte_count'} = $_;
} elsif (m/^\s+index name:\s+(\w.*)/) {
push(@{ $Hash{$name}{'indexes'} }, $1);
}
}
close $IN;
foreach my $key (keys %Hash) {
print $OUT "File: $key
\n";
print $OUT "\tRecord Size: $Hash{$key}{'record_size'}
\n";
print $OUT "\tLast Record: $Hash{$key}{'last_record'}
\n";
print $OUT "\tData Byte Count: $Hash{$key}{'data_byte_count'}
\n";
my $str = join ',', @{ $Hash{$name}{'indexes'} };
print $OUT "Index Names: $str\n";
}
}