in reply to Re: Re: Re: Unix Perl and Html
in thread Unix Perl and Html
Would this be an accurate representation of this program? Did i substitute the correct variables?#!/usr/bin/perl -w use strict; use CGI; my $main=new CGI; print $main->header; print $main->start_html ("Printer Status"); open(usr/lsys/printstatus/printstatus.out ,"logfile.html"); while(<usr/lsys/printstatus/printstatus.out>) { chomp; if (! ($_=~/----------------------------/)) { #my ($printer,$display,$toner,$level) = split(/ /, $_); my @status = split(/ /, $_); if (($status[0] eq "name") && ($status[1] eq "display")) { print "<center><table width=250 border=1><tr align=center> +\n"; for (@status) { print "<td><b>$_</b></td>\n"; } print "</tr>\n"; } } } print "</table>\n"; close (usr/lsys/printstatus/printstatus.out); exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Unix Perl and Html
by thatguy (Parson) on Aug 22, 2001 at 20:14 UTC | |
by meccaxlr (Initiate) on Aug 27, 2001 at 18:33 UTC | |
by thatguy (Parson) on Aug 27, 2001 at 20:09 UTC | |
by dragonchild (Archbishop) on Aug 27, 2001 at 20:46 UTC |