In your program you do "use CGI" but then you don't actually use it! By using ':standard' it gives you an easy way to type HTML that is much cleaner than HTML so it's easy to understand and edit. Here are your 2 exact programs using all the juicy CGI shortcuts for HTML.
home.cgi:
Sys_Load.cgi:#!/usr/bin/perl use strict; use warnings; use CGI qw/:standard center/; my $date = localtime; print header.start_html(-bgcolor=>'#c0e0f9').br. center( h1('Home'). h3($date). img({src=>'root_partition.cgi' }).br.br.br. img({src=>'var_partition.cgi' }).br.br.br. img({src=>'stacked_Bar_graph.cgi' }).br.br.br. img({src=>'topsenders_hbar.cgi' }).br.br.br. img({src=>'toprecipients_hbar.cgi'}).br.br.br ).end_html;
CGI is awesome. Enjoy!#!/usr/bin/perl use strict; use warnings; use CGI ':standard'; use Sys::Load qw/getload uptime/; my ($one_m, $five_m, $fifteen_m) = (getload())[0,1,2]; print header.start_html(-bgcolor=>'#c0e0f9'). table({-style=>'width:20%'},caption('Load Average'), Tr( th({-bgcolor=>'#FFDD00',-height=>'25'},'1 Minute' ). th({-bgcolor=>'#FFDD00',-height=>'25'},'5 Minutes' ). th({-bgcolor=>'#FFDD00',-height=>'25'},'15 Minutes') ), Tr({-style=>'font-family:veranda',-bgcolor=>'#FFFFFF'}, td($one_m), td($five_m), td($fifteen_m) ) ).end_html;
In reply to Re: How to PRINT CGI html table to a PNG file
by Anonymous Monk
in thread How to PRINT CGI html table to a PNG file
by theravadamonk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |