# # open report files for printing my $filepath = "/usr/openv/scripts"; open *NTOUT, ">>$filepath/nt.html" or die "cannot open nt file for writing: $!\n"; open *UNIXOUT, ">>$filepath/unix.html" or die "cannot open unix file for writing: $!\n"; open *MAILOUT, ">>$filepath/mail.html" or die "cannot open mail file for writing: $!\n"; # # some unrelated code ...... # foreach my $class ( sort keys %classHash ) { if ( $classHash{$class} = "NT" ) { $outhandle = *NTOUT; } if ( $classHash{$class} = "UNIX" ) { $outhandle = *UNIXOUT; } if ( $classHash{$class} = "MAIL" ) { $outhandle = *MAILOUT; } foreach my $status ( sort keys %{ $classHash{$class} } ) { if ( $status eq "success" ) { print $outhandle < $class: Successful Jobs SUC