in reply to Re^2: nested <FILE> read returns undefined?
in thread nested <FILE> read returns undefined?
Why I did it...I skip ahead (in the second loop), looking for the next record.
I may be missing something (you haven't said what the second loop actually does, so I can't be sure), but couldn't this be better handled with next ?
Regarding the soap box, as rjray pointed out, the important part here is the list context. I don't have the camel on me at the moment, but the behaviour of filehandles in list context is documented in perldoc perlintro as well as perldoc perltrap.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: nested <FILE> read returns undefined?
by argv (Pilgrim) on Apr 01, 2006 at 06:39 UTC | |
by tirwhan (Abbot) on Apr 01, 2006 at 08:28 UTC | |
by argv (Pilgrim) on Apr 01, 2006 at 18:43 UTC | |
by graff (Chancellor) on Apr 02, 2006 at 05:07 UTC | |
|
Re^4: nested <FILE> read returns undefined?
by argv (Pilgrim) on Apr 01, 2006 at 06:30 UTC | |
by tirwhan (Abbot) on Apr 01, 2006 at 08:44 UTC | |
by argv (Pilgrim) on Apr 01, 2006 at 18:56 UTC |