Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: Two meanings of undef

by AnomalousMonk (Archbishop)
on Aug 15, 2020 at 22:49 UTC ( [id://11120797]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Two meanings of undef
in thread Two meanings of undef

In FAT if you delete item from the directory it is still present but marked as deleted.

So the fact that it is still present does not change the fact that semantically it is deleted.

Further to stevieb's and haukex's comments:   In a file system, if you delete a file and then create another file with the same name, do you get any warning that the old file still, in any sense, "exists", or "masks" anything, or that there is any possible symbol/name collision? The symbol spaces of Perl are not file systems.

c:\@Work\Perl\monks>perl -wMstrict -le "my $scalar = 42; undef $scalar; my $scalar; " "my" variable $scalar masks earlier declaration in same scope ...
Of course, this message is only emitted if warnings are enabled, but it highlights the fact that an undef-ed scalar still very much exists. (Same behavior with our package-global scalars.)

I think the critical point that you miss is that undef is a very well-defined value! It is not random, it can be tested, scalars having that value exist in every sense, etc.


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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-24 12:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found