in reply to Re^2: Different behaviors between "while" and "map"
in thread Different behaviors between "while" and "map"
It helps to know that the loop is expanded to:
while ($_ = <SOME_FILE_HANDLE>){ ... }
This shows that <...> is nothing more than a loop condition: the loop body is executed immediately after each evaluation of the <...> operator. This is how a while loop works.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Different behaviors between "while" and "map"
by JavaFan (Canon) on Dec 06, 2008 at 02:18 UTC | |
by ikegami (Patriarch) on Dec 06, 2008 at 06:09 UTC |