# 0 to go directly to the web, or 1 to authorize first $auth = 0; if ($auth == 0) { LINE: for ($i=0; defined($i); $i++){ unless (-e "./data/$month.dat") { open (FILE, "+>>./data/$month.dat"); flock(FILE,2) or next LINE; print FILE "$event\|$month $day $year\|$place\|$addr\|$desc\|$contact\|$phone\|$county\|"; close FILE; last LINE; } } # Tried to add this to get access to file, but didn't work # chmod 0666, "./data/$month.dat"; }elsif ($auth == 1){ LINE: for ($i=0; defined($i); $i++){ unless (-e "./tempevents/$i.dat") { open (FILE, ">./tempevents/$i.dat"); flock(FILE,2) or next LINE; print FILE "$event\|$month $day $year\|$place\|$addr\|$desc\|$contact\|$phone\|$county\|"; close FILE; last LINE; } } } # End