home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!ames!pacbell.com!charon.amdahl.com!netcomsv!mama!simpson
- From: iac!simpson@uunet.uu.net (Scott Simpson)
- Newsgroups: comp.lang.perl
- Subject: Bug in perl. Infinite loop on EOF.
- Summary: Perl goes in an infinite loop on EOF.
- Keywords: infinite loop, end of file
- Message-ID: <913@iac.uunet.uu.net>
- Date: 12 Jan 93 23:55:03 GMT
- Reply-To: iac!simpson@uunet.uu.net
- Organization: Investment Technology Group, Culver City, CA
- Lines: 28
-
-
- This is perl, version 4.0
-
- $RCSfile: perl.c,v $$Revision: 4.0.1.7 $$Date: 92/06/08 14:50:39 $
- Patch level: 33
-
- I have the following script:
-
- #! /usr/lbin/perl
- while (<>) {
- chop;
- if ($line2 = <>) {
- if ($line3 = <>) {
- ;
- }
- }
- }
-
- and the following data file:
-
- line1
- line2
-
- When I run the script on the file, perl goes in an infinite loop. If I
- run it in the debugger, the debugger goes in an infinite loop on the
- inner loop statement.
- --
- Scott Simpson, Investment Technology Group, iac!simpson@uunet.uu.net
-