PL_sv_undef, PL_sv_no and PL_sv_yes are three distinct values with distinct properties. Only PL_sv_undef is undef.
Dave. | [reply] [Watch: Dir/Any] |
#!/usr/bin/perl --
use Devel::Peek qw/ Dump /;
select STDERR;
print "\n\$ARGV\n"; Dump( $ARGV );
print "\nundef\n"; Dump( undef );
print "\n!!0 PL_sv_no\n"; Dump( !!0 );
print "\ndefined undef\n"; Dump( defined undef );
print "\n!!1 PL_sv_yes\n"; Dump( !!1 );
print "\ndefined defined undef\n"; Dump( defined defined undef );
__END__
$ARGV
SV = NULL(0x0) at 0x99b90c
REFCNT = 1
FLAGS = ()
undef
SV = NULL(0x0) at 0x3f4cc0
REFCNT = 2147482895
FLAGS = (READONLY)
!!0 PL_sv_no
SV = PVNV(0x3f7f84) at 0x3f4968
REFCNT = 2147483646
FLAGS = (PADTMP,IOK,NOK,POK,READONLY,pIOK,pNOK,pPOK)
IV = 0
NV = 0
PV = 0x3f405c ""\0
CUR = 0
LEN = 12
defined undef
SV = PVNV(0x3f7f84) at 0x3f4968
REFCNT = 2147483646
FLAGS = (PADTMP,IOK,NOK,POK,READONLY,pIOK,pNOK,pPOK)
IV = 0
NV = 0
PV = 0x3f405c ""\0
CUR = 0
LEN = 12
!!1 PL_sv_yes
SV = PVNV(0x3f7f9c) at 0x3f4978
REFCNT = 2147483643
FLAGS = (PADTMP,IOK,NOK,POK,READONLY,pIOK,pNOK,pPOK)
IV = 1
NV = 1
PV = 0x3f8e7c "1"\0
CUR = 1
LEN = 12
defined defined undef
SV = PVNV(0x3f7f9c) at 0x3f4978
REFCNT = 2147483643
FLAGS = (PADTMP,IOK,NOK,POK,READONLY,pIOK,pNOK,pPOK)
IV = 1
NV = 1
PV = 0x3f8e7c "1"\0
CUR = 1
LEN = 12
| [reply] [Watch: Dir/Any] [d/l] |