in reply to Re^2: Strange piece of code!
in thread Strange piece of code!

It's not selecting ERRPF again, it's reselecting the original filehandle... whatever was current before the first select (before ERRPF). select returns the filehandle that was current before the call.

Read it from the inside out:

  1. select ERRPF and remember whatever was selected beforehand.
  2. Set autoflush on ERRPF
  3. Return to the outer select the first element in the list, which is the filehandle that we remembered in step one
  4. select that "remembered" filehandle.

Dave

Replies are listed 'Best First'.
Re^4: Strange piece of code!
by solegaonkar (Beadle) on Jul 26, 2012 at 10:09 UTC
    O! I get it now. Thank you Sir!