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?
Devel::Peek thinks that \$dbh is an SV, which stands for scalar value.$ 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
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
In reply to Re: Why was it neccessary to pass a DBI handler by reference?
by Abigail-II
in thread Why was it neccessary to pass a DBI handler by reference?
by kudra
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |