foreach my $ele (@documentlist){ my $file = ${$ele->name()}.'.html'; open(my $fh,'>',$file) or die $!;+ print $fh '