> Orton, Yves wrote: > > > Doesnt that make virtually every string a dualvar? > > Not unless the string has been used in a numeric context before: > > > $ perl -MDevel::Peek -e '$pv = "Test"; Dump $pv; $dv = 42; > $dv = "HHGTTG"; Dump $dv;' > > SV = PV(0x804d5d8) at 0x806572c > > REFCNT = 1 > > FLAGS = (POK,pPOK) > > PV = 0x805f240 "Test"\0 > > CUR = 4 > > LEN = 5 > > SV = PVIV(0x804d9e8) at 0x80657a4 > > REFCNT = 1 > > FLAGS = (POK,pPOK) > > IV = 42 > > PV = 0x805ede0 "HHGTTG"\0 > > CUR = 6 > > LEN = 7 > > I meant WRT Zefram's definition: 0+$val ne $val Which means that 0+"HHGTTG" ne "HHGTTG" thus pretty much any string that matches \D (insert suitable handwaving here) would be a dualvar based on his criteria. Basically I was making this point as an addendum to Hugo saying that the rules were more complicated than that. YvesThread Previous | Thread Next