Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: open undef shift

by ikegami (Patriarch)
on Oct 03, 2009 at 18:49 UTC ( [id://799041]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://799041]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-20 01:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found