in reply to Re: It is weird, it is mad, but is it portable? (foreach question)
in thread It is weird, it is mad, but is it portable? (foreach question)

IMHO it is foolish to rely on undocumented behaviour, even if it works with the current perl version. There's no guarantee that future implementations will do it the same way. Future implementations might implement a more iterator-like approach (for example to remove the memory panelty that for (<filehandle>){...} involves, or for other reasons).

If somebody relies on the current behaviour, sending a doc patch to p5p is the thing to do. Once that doc patch is in a stable version of perl, you can rely on it.

  • Comment on Re^2: It is weird, it is mad, but is it portable? (foreach question)
  • Download Code