Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Difference between exists and defined

by thanos1983 (Parson)
on Apr 16, 2019 at 09:37 UTC ( [id://1232633]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    A hash or array element can be true only if it's defined and defined o
    +nly if it exists, but the reverse doesn't necessarily hold true.
    
  2. or download this
    exists may also be called on array elements, but its behavior is much 
    +less obvious and is strongly tied to the use of delete on arrays.
    
    WARNING: Calling exists on array values is strongly discouraged. The n
    +otion of deleting or checking the existence of Perl array elements is
    + not conceptually coherent, and can lead to surprising behavior.
    
  3. or download this
    #!/usr/bin/perl
    use strict;
    ...
              undef,
              2
            ];
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2024-04-24 14:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found