Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: 0.123, float or integer

by guha (Priest)
on Feb 05, 2002 at 23:55 UTC ( [id://143504]=note: print w/replies, xml ) Need Help??


in reply to Re: 0.123, float or integer
in thread 0.123, float or integer

A quick test with Devel::Peek revealed the following info:
Testscript: SV = PV(0x176ec4c) at 0x1765288 REFCNT = 1 FLAGS = (PADBUSY,PADMY,POK,pPOK) PV = 0x17601c0 "0.123"\0 CUR = 5 LEN = 8
Original program: SV = PVIV(0x1adb6f4) at 0x1b874d8 REFCNT = 1 FLAGS = (PADBUSY,PADMY,POK,pPOK) IV = 0 PV = 0x1ade30c "83.4"\0 CUR = 4 LEN = 8

Perhaps because it's late at night but, I can't figure out anything else than that the number is interpreted as a string.
But that is odd too, I thought a string would evaluate to zero or the number not int($number) ???

---
It's unfair to be an expert.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://143504]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-19 18:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found