#!/usr/bin/perl -w use strict; use CGI qw/:standard/; use CGI::Carp qw(fatalsToBrowser); my @headings = ('Time','MC3004','MC3005','MC3027'); my @rows = th(\@headings); open LABS, "/software/polaris-mfcf/data/local/w.stat" or die "Unable to open file: $!\n"; for () { my ($time,$num4,$num5,$num7) = split; $time = localtime($time); my $check = substr(localtime(time),4,6); push @rows, td([$time,$num4,$num5,$num7]) if $time =~ /$check/; } close LABS; print header; print start_html('Polaris Usage'); print table({-border=>undef}, caption(strong('Polaris Terminal Usage')), Tr(\@rows) ); print end_html;