Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Two meanings of undef

by davido (Cardinal)
on Aug 16, 2020 at 03:04 UTC ( #11120801=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl
    
    ...
    eval 'undef $main::xyz;';
    
    print "After undef: \$xyz ", (exists($::{'xyz'}) ? 'exists' : 'does no
    +t exist'), "\n";
    
  2. or download this
    Before assignment: $xyz does not exist
    After assignment: $xyz exists
    42
    After undef: $xyz exists
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2021-03-06 08:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (116 votes). Check out past polls.

    Notices?