Hi,
In my startup.pl I'm calling a function that initializes read-only
variables - read in from several text files.
After it reads in the first it fails on every one thereafter with the message:
Read on closed filehandle <SYS1> at lpinit.pl line 78
Read on closed filehandle <SYS2> at lpinit.pl line 99
etc..
Here some sample code in lpinit.pl
open(SYS, "$PathData/file0.txt");
while (<SYS>) {
# Read in data from text file0
}
}
close SYS;
open(SYS1, "$PathData/file2.txt");
while (<SYS1>) {
# Read in the data from file1
}
}
close SYS1;
open(SYS2, "$PathData/file2.txt");
while (<SYS2>) {
# Read in the data from file2
}
}
close SYS2;
It works for the first but fails for the 2, 3, 4, 5 and 6th.
Any ideas whats causing the error.
Thanks
David