Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: Numification of strings

by ww (Bishop)
on Aug 02, 2010 at 18:27 UTC ( #852514=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Numification of strings
in thread Numification of strings

"As you can see $a is a string "PV", while $b is an int "IV", even thought it was never used in an numeric context."

If you mean what I think you mean -- that $b is an int BECAUSE it was never used in a numeric content -- I think you're wrong, morgon: $b IS an IV, because it was instantiated that way... as an integer, without quotes that would have made it a string.

Update: Maybe I have the code tags right... at last.


Comment on Re^4: Numification of strings
Select or Download Code
Replies are listed 'Best First'.
Re^5: Numification of strings
by morgon (Deacon) on Aug 02, 2010 at 19:06 UTC
    If you mean what I think you mean ...

    :-)

    I meant to disprove the theory that a value becomes an int only after being used in a numeric context by showing an example in which a value is only instantiated (and never used in a numeric context), yet still is numeric.

    Or less convoluted: I probably meant what you said.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (14)
As of 2015-07-07 18:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls