Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Unexpected warning in mkdir

by AnomalousMonk (Archbishop)
on May 12, 2015 at 21:18 UTC ( [id://1126462]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Unexpected warning in mkdir
in thread Unexpected warning in mkdir

When created, a scalar is initialized by default to the undef value. It can be given an explicit initialization value via an initializer list. But if the initializer list is empty, what other value than undef would one expect the scalar to receive?


Give a man a fish:  <%-(-(-(-<

Replies are listed 'Best First'.
Re^4: Unexpected warning in mkdir
by sundialsvc4 (Abbot) on May 13, 2015 at 13:31 UTC

    I would have superficially read that syntax to mean – would have initially assumed it to mean – “an empty List.”   I would assume that it otherwise makes no syntactic sense for there to be two parentheses back-to-back with nothing in-between them.   I would have soon-enough seen the “error” of my ways, but there are many times when you see something written in the source-code of a program whereby you assume that you know what it means, but the language-designers thought differently.   So it goes.

      I would have superficially read that syntax to mean - would have initially assumed it to mean - "an empty List." ... I would have soon-enough seen the "error" of my ways, but there are many times when you see something written in the source-code of a program whereby you assume that you know what it means...

      But the syntax () does mean an empty list. And if your complaint is that you only "superficially read" the source code and "assumed" its meaning, then you're really just complaining about your own ignorance. The fact that a scalar $foo can only hold exactly one thing is Perl 101, and how the assignment of a list to a scalar behaves is - if we're being generous - Perl 102. If your Perl knowledge doesn't even reach that level after 7+ years of posting to a Perl-only website, all this time you've spent trying to "answer" questions here seems like kind of a waste, no?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-03-29 12:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found