为什么LEN
从过去的Dump
80 年来到这里?
#!/usr/bin/env perl
use warnings;
use strict;
use 5.10.1;
use Devel::Peek;
my $a = 'a';
Dump $a;
print 'Enter an "a": ';
$a = <>;
chomp $a;
Dump $a;
my $b = 'a';
Dump $b;
print 'Enter an "a": ';
my $c = <>;
chomp $c;
Dump $c;
输出:
SV = PV(0x125b090) at 0x127e018
REFCNT = 1
FLAGS = (PADMY,POK,pPOK)
PV = 0x126df80 "a"\0
CUR = 1
LEN = 16
Enter an "a": a
SV = PV(0x125b090) at 0x127e018
REFCNT = 1
FLAGS = (PADMY,POK,pPOK)
PV = 0x126df80 "a"\0
CUR = 1
LEN = 16
SV = PV(0x125b190) at 0x127e0d8
REFCNT = 1
FLAGS = (PADMY,POK,pPOK)
PV = 0x1290da0 "a"\0
CUR = 1
LEN = 16
Enter an "a": a
SV = PV(0x125b1a0) at 0x128f260
REFCNT = 1
FLAGS = (PADMY,POK,pPOK)
PV = 0x1285c70 "a"\0
CUR = 1
LEN = 80