Thanks, It is working as expected! -----Original Message----- From: Wagner-David [mailto:[EMAIL PROTECTED]] Sent: Friday, December 07, 2001 2:39 PM To: 'Wright, Thomas'; Beginners (E-mail) Subject: RE: loopy question
Yes, as long as you don't need the current record otherwise you would need to change the way your loop functions to only read when necessary. Wags ;) -----Original Message----- From: Wright, Thomas [mailto:[EMAIL PROTECTED]] Sent: Friday, December 07, 2001 11:23 To: Beginners (E-mail) Subject: loopy question Folks, A questions about loops and files. If I have the following construct: while (<FILEA>) { $recA = $_ do something; while (<FILEB>) { $recB = $_; if ($this) { do something2; } elsif ($that) { do something3; last; } else { # the other do something4; last; } } do something5; } When the inner loop is exited, the outer loop continues, then it reenters the inner loop again. opening and closing the files takes place outside of both loops. Question(s?): Will the position in FILEB be held so that reading data from it will pick up where it was left off when exiting the inner loop previously? If not, what happens/where will it be? (implicit close/reopen?) ( I know, I would rather use an array, but the file is too large to load into memory). Thanks, Tom Wright 201.930.7517 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]