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

Dave, Thanks for that. But that is what confuses me.. is there any value added by selecting ERRPF again?

Replies are listed 'Best First'.
Re^3: Strange piece of code!
by davido (Cardinal) on Jul 26, 2012 at 10:05 UTC

    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

      O! I get it now. Thank you Sir!