Considering that arrays and hashes can only contain scalars,
how do you construct multi-dimensional datastructures?
The first paragraph of the description section of 'man perlref' says Any scalar may hold a hard reference.
(Hard reference is used here to indicate it's not a soft- or
symbolic reference). If references aren't scalars, what does
that sentence mean?
$ perl -MDevel::Peek -wle 'my $dbh = "foo"; Dump \$dbh'
SV = RV(0x8194068) at 0x817cca0
REFCNT = 1
FLAGS = (TEMP,ROK)
RV = 0x817cd54
SV = PV(0x817cf90) at 0x817cd54
REFCNT = 2
FLAGS = (PADBUSY,PADMY,POK,pPOK)
PV = 0x818f688 "foo"\0
CUR = 3
LEN = 4
Devel::Peek thinks that \$dbh
is an SV, which stands for scalar value.
So, what is it that makes you think that references aren't
scalars? Do you have documentation quotes, code fragments,
or pointers to the source that back up your claim?
Abigail |