in reply to Re: open undef shift
in thread open undef shift

The OP wasn't clear, but I believe the question is "Why do some means of obtaining an undefined value behave differently than others?" (answer), and perhaps "What happens when one passes undef as the file name to open?" (answer).

Replies are listed 'Best First'.
Re^3: open undef shift
by AnomalousMonk (Archbishop) on Oct 04, 2009 at 04:36 UTC
    My intention was only to offer another datapoint.

    I found it interesting that a lexical scalar initialized to the empty string behaved the same (minus the warning) as a virgin lexical. This behavior seems reasonably explained in ikegami's Re^2: open undef shift above.

      I found it interesting that a lexical scalar initialized to the empty string behaved the same (minus the warning) as a virgin lexical.

      Why? What file do you expect undef to find when it's not treated specially?

      Seems to me your data point is nothing more what the OP set forth in his question: an initialised scalar isn't treated specially. Thus my explanation.