#!/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 () { my $line = $_; $line =~ s/\n$//; my @events = split ("::", $line); if ($events[1] eq ""){$lc = $line}; ############################## # Print Parish Events ############################## print header(), start_html(-title=>'Script'), "
$events[0] $events[1], $events[2] $events[3]
$events[4]
", end_html(); ##################################### if ($events[1] eq ""){ #flock (FILE, 8 ); close (FILE); } }