5 use CGI::Carp qw(fatalsToBrowser);
7 use POSIX qw(strftime);
9 print "Content-type: text/html\r\n\r\n";
14 <title>Zebra printers status</title>
20 foreach my $filename ( glob '/tmp/zebra/*.status' ) {
21 my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
22 $atime,$mtime,$ctime,$blksize,$blocks)
25 my $date = strftime "%Y-%m-%d %H:%M:%S", localtime($mtime);
30 open(my $fh, $filename);
35 $style=' style="color:#c00"' if $status =~ m/error/;
37 print "<h1$style>$filename $date</h1>\n\n";
38 print "<pre$style>$status</pre>\n\n";