in reply to A question about the diamond...

Just another example of why you shouldn't copy globs containing open file handles. It is tempting because the syntax is so terse, but there are just too many ways that it fails. Use this instead:

open STDIN, "<&DATA" or die "Can't dup DATA to STDIN: $!\n"; print for <>; __END__ This *is* printed.

                - tye

Replies are listed 'Best First'.
Re: Re: A question about the diamond... (open)
by fokat (Deacon) on Oct 31, 2003 at 18:57 UTC

    I was using open in my code. The syntax I pasted in the snippet was my attempt at maximal simplification so as to produce the smallest test case possible. Thanks a lot for the advice tye!

    Best regards

    -lem, but some call me fokat