W
Wijnand Nijs
Hello,
I have a problem with the next recursive subroutine used in a mailing
script:
#-----------------------
# sub built_tolist
# format lines listfiles:
# referense to a listfile = |0|nijs-bruls|
# subscribed address = |1|firstname|surname|mailaddress|etc.
# unsubscribed address = |2|firstname|surname|mailaddress|etc.
#-----------------------
sub built_tolist($) {
local (*FILE);
my $Listfile = shift;
my $Listline;
my @ems;
open (FILE,"<$Listfile");
while ($Listline=<FILE>) {
chop $Listline;
@ems = split(/$Delimiter/,$Listline);
if ($ems[1] eq "0") {
&built_tolist($ems[2]);
}
elsif ($ems[1] eq "1") {
push(@Tolist,$ems[4]);
}
else {
}
}
close(FILE);
return(1);
}
it comes 2 times (2 references in the called listfile) with the error:
readline() on closed filehandle FILE at G:/cgi-bin/mailing/send_2.pl
line 224.
I have used a local filehandle (*FILE)! Can sombody help me where to look?
Greetings...
Wijnand
I have a problem with the next recursive subroutine used in a mailing
script:
#-----------------------
# sub built_tolist
# format lines listfiles:
# referense to a listfile = |0|nijs-bruls|
# subscribed address = |1|firstname|surname|mailaddress|etc.
# unsubscribed address = |2|firstname|surname|mailaddress|etc.
#-----------------------
sub built_tolist($) {
local (*FILE);
my $Listfile = shift;
my $Listline;
my @ems;
open (FILE,"<$Listfile");
while ($Listline=<FILE>) {
chop $Listline;
@ems = split(/$Delimiter/,$Listline);
if ($ems[1] eq "0") {
&built_tolist($ems[2]);
}
elsif ($ems[1] eq "1") {
push(@Tolist,$ems[4]);
}
else {
}
}
close(FILE);
return(1);
}
it comes 2 times (2 references in the called listfile) with the error:
readline() on closed filehandle FILE at G:/cgi-bin/mailing/send_2.pl
line 224.
I have used a local filehandle (*FILE)! Can sombody help me where to look?
Greetings...
Wijnand