cal has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/local/bin/perl -w use strict; use diagnostics; use CGI qw(:standard); ############################# #initialize variable ############################# my $db ="events.txt"; open (FILE, "<" . $db) || die "Well, whats up.. cant open file"; #flock (FILE, 2 ); my $lc = 0; ###################################### # Start of while loop ###################################### while (<FILE>) { my $line = $_; $line =~ s/\n$//; my @events = split ("::", $line); if ($events[1] eq ""){$lc = $line}; ############################## # Print Parish Events ############################## print header(), start_html(-title=>'Script'), "<HR> <table border='0' width='100%'> <tr> <td width='100%'> <table + border='0' width='100%'> + <tr> + <td width='100%'> + <table border='0' width='100%'> + <tr> + <td width='22%'><font SIZE='+1'color='gray' +><B>$events[0] $events[1], $events[2]</B></font></td> + <td width='78%'><font SIZE='+1'color='black +'><B>$events[3]</B></font></td> + </tr> + </table> + </td> + </tr> + <tr> + <td width='100%'><font SIZE='2'>$events[4]</font></td> + </tr> </tabl +e> </td> </tr> </table>", end_html(); ##################################### if ($events[1] eq ""){ #flock (FILE, 8 ); close (FILE); } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Printing with CGI.pm
by metadatum (Scribe) on Jul 20, 2002 at 19:52 UTC | |
by cal (Beadle) on Jul 20, 2002 at 20:11 UTC | |
by mephit (Scribe) on Jul 21, 2002 at 04:07 UTC | |
Re: Printing with CGI.pm
by Kanji (Parson) on Jul 20, 2002 at 20:02 UTC | |
(jptxs) Re: Printing with CGI.pm
by jptxs (Curate) on Jul 21, 2002 at 13:45 UTC | |
Re: Printing with CGI.pm
by Jazz (Curate) on Jul 22, 2002 at 06:09 UTC | |
Re: Printing with CGI.pm
by Wally Hartshorn (Hermit) on Jul 22, 2002 at 22:05 UTC |