################################# # open report files for printing # yes, @fhandles is populated # yes, I am using strict # yes, I am using perl -w # = ) my $filepath = "/usr/openv/scripts"; open $fhandles[0], ">>$filepath/nt.html" or die "cannot open $filepath/nt.html for writing: $!\n"; open $fhandles[1], ">>$filepath/mail.html" or die "cannot open $filepath/mail.html for writing: $!\n"; open $fhandles[2], ">>$filepath/unix.html" or die "cannot open $filepath/unix.html for writing: $!\n"; ##### code................... # Print HTML-header the hard way... foreach (@fhandles) { my $team; $outhandle = $_; if ( $outhandle =~ /NT/ ) { $team = "Windows Infrastructure Team"; } if ( $outhandle =~ /MAIL/ ) { $team = "Mail Team"; } if ( $outhandle =~ /UNIX/ ) { $team = "UNIX Infrastructure Team"; } print $outhandle < [Backup report] $humanstart - $humanstop

Daily Backup Report: $team

From $humanstart to $humanstop

EOC } ## ## ## HERES WHERE I WANT TO PLACE MY LIST OF HTML ANCHORS ## ## foreach my $class ( sort keys %classHash ) { foreach my $status ( sort keys %{$classHash{$class}} ) { if ( $classname{$class} eq "NT" ) { $outhandle = *NTOUT; } if ( $classname{$class} eq "UNIX" ) { $outhandle = *UNIXOUT; } if ( $classname{$class} eq "MAIL" ) { $outhandle = *MAILOUT; } if ($status eq "success") { print $outhandle < $class: Successful Jobs SUC } elsif ($status eq "partial" ) { print $outhandle < $class: Partially Successful Jobs PAR } elsif ( $status eq "failed" ) { print $outhandle < $class: Failed Jobs FAIL } elsif ( $status eq "active" ) { print $outhandle < $class: Active Jobs ACT } elsif ( $status eq "queued" ) { print $outhandle < $class: Queued Jobs QUE } print $outhandle < Hostname Job-ID Schedule Status Server Files Tries Start End Duration Mbytes Speed EOC foreach my $id ( @{$classHash{$class}->{$status}} ) { my $thisjob = $alljobs{$id}; my $MB = $thisjob->{kbytes} / 1000; &print_report_line( $thisjob->{client}, $thisjob->{jobid}, $thisjob->{schedule}, $thisjob->{status}, $thisjob->{server}, $thisjob->{files}, $thisjob->{trycount}, &epoch($thisjob->{started}), &epoch($thisjob->{ended}), $thisjob->{elapsed}, #&beautify_number($thisjob->{kbytes}), &round($MB), ($thisjob->{elapsed} gt 0 ? int(($thisjob->{kbytes}/$thisjob->{elapsed})*100)/100 : "0.00")); if ($status eq "failed" ) { &print_errortext_line($thisjob->{status}); } } print $outhandle "
\n"; } }