U
usenet
According to perldoc -f eof:
eof Returns 1 if the next read on FILEHANDLE will return end of file
This does not seem to be true when reading __DATA__. The function
returns 1 no matter what. For example:
#!/usr/bin/perl
for (<DATA>) {
print eof;
}
__DATA__
1
2
3
will print "1" three times.
Is there a way to determine if *DATA has been exhausted?
eof Returns 1 if the next read on FILEHANDLE will return end of file
This does not seem to be true when reading __DATA__. The function
returns 1 no matter what. For example:
#!/usr/bin/perl
for (<DATA>) {
print eof;
}
__DATA__
1
2
3
will print "1" three times.
Is there a way to determine if *DATA has been exhausted?