Google Groups Home
Help | Sign in
FAQ 4.54 Why does defined() return true on empty arrays and hashes?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
PerlFAQ Server  
View profile
 More options May 16, 9:03 pm
Newsgroups: comp.lang.perl.misc
From: PerlFAQ Server <br...@stonehenge.com>
Date: Fri, 16 May 2008 18:03:02 -0700
Local: Fri, May 16 2008 9:03 pm
Subject: FAQ 4.54 Why does defined() return true on empty arrays and hashes?
This is an excerpt from the latest version perlfaq4.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

4.54: Why does defined() return true on empty arrays and hashes?

    The short story is that you should probably only use defined on scalars
    or functions, not on aggregates (arrays and hashes). See "defined" in
    perlfunc in the 5.004 release or later of Perl for more detail.

--------------------------------------------------------------------

The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
are not necessarily experts in every domain where Perl might show up,
so please include as much information as possible and relevant in any
corrections. The perlfaq-workers also don't have access to every
operating system or platform, so please include relevant details for
corrections to examples that do not work on particular platforms.
Working code is greatly appreciated.

If you'd like to help maintain the perlfaq, see the details in
perlfaq.pod.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google