Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Two meanings of undef

by AnomalousMonk (Bishop)
on Aug 15, 2020 at 22:49 UTC ( #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
Node Status?
node history
Node Type: note [id://11120797]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2020-10-26 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (250 votes). Check out past polls.

    Notices?