Here is the code that is giving the error
I have marked line 191.
The error I get is
<PRE>syntax error at sem_reg_test.cgi line 191, near "open
(COURSEINFO, &qu
ot;$coursefile"
Global symbol "$item" requires explicit package name at
sem_reg_test.c
gi line 230.
Global symbol "$item" requires explicit package name at
sem_reg_test.c
gi line 230.
################################################## ##############################
# Reads in course information from file
sub read_course_info {
my @allcourse = ("basic_mtx.data","packet_mtx.data") ;
# Checking the directory for available courses
if($set eq "all")
{
foreach my $mycourse(@allcourse){
open (AllINFO, "data/$mycourse")
|| die "$0: could not read course information:$!;
while(<ALLINFO>){
# removing trailing newline
chomp;
# Save comments and blank lines
if(/^#/ || /^\s*$/){
push(@courses_new, $_);
next;
}
#accumulate list of courses
push(@courses,$_);
}
close(ALLINFO);
}
else {
Line 191

pen (COURSEINFO, "$coursefile")
|| die "$0:could not read course information ($coursefile):
$!\n";
# flock(COURSEINFO, 1);
while (<COURSEINFO>) {
# remove trailing newline
chomp;
# save comments and blank lines
if (/^#/ || /^\s*$/) {
push(@courses_new, $_);
next;
}
# accumulate list of courses
push(@courses, $_);
}
close(COURSEINFO);
}
}
################################################
Any help will be appreciated.
Thanks,
MJ