Frank [F], on Monday, May 16, 2005 at 21:34 (+0800) wrote the
following:
F> How to determin whether I reach the end of file in Perl program? Also
F> , can you tell me where I can get these informations . I scan the
F> "programing perl " by Larry Wall, But it is diffculty to find what I
F> want from such a cyclopaedia.
maybe you read file in while loop. If it is EOF, it returns 'undef',
so while condition ends (while will execute something if condition
returns true)
So:
while(<$fh>) {
print;
}
--
How do you protect mail on web? I use http://www.2pu.net
[When the carpal hits the fan...look out for flying electrons !]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>