On Thu, Oct 17, 2002 at 03:49:31PM -0700, John W. Krahn wrote: > Michael Fowler wrote: > > while (1) { > > my $first_in = <FIRSTIN>; > > last unless defined $first_in; > > > > my $second_in = <SECONDIN>; > > last unless defined $second_in; > > > > print FIRSTOUT "$first_in\n"; > > print SECONDOUT "$second_in, $first_in\n"; > > } [snip] > If you want to stop at EOF you should test for EOF. :-)
I did. The only condition under which those reads will return undef is on EOF. Granted, yours is another method for doing it, but mine is equally valid. IMHO mine is also preferable; testing the variable for definedness is how it's usually done anyways, and it doesn't involve an extra read, which the eof() operator does. Michael -- Administrator www.shoebox.net Programmer, System Administrator www.gallanttech.com -- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]