Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re^3: Numification of strings

by LanX (Chancellor)
on Aug 02, 2010 at 14:00 UTC ( #852473=note: print w/replies, xml ) Need Help??

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

well always? :)

dualvar NUM, STRING Returns a scalar that has the value NUM in a numeric contex +t and the value STRING in a string context. $foo = dualvar 10, "Hello"; $num = $foo + 2; # 12 $str = $foo . " world"; # Hello world

Cheers Rolf

Replies are listed 'Best First'.
Re^4: Numification of strings
by Jenda (Abbot) on Aug 02, 2010 at 14:05 UTC

    And what does this disagree with? I never said the integer and string values of a scalar variable have to be in any way related.

    Enoch was right!
    Enjoy the last years of Rome.

      Well take it as clarification that there are no "string variables" but "scalar variables" with different slots.

      Perl is so magic that, easy answers are not always true...

      Cheers Rolf

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://852473]
[karlgoethebier]: takes a beer from the fridge
[karlgoethebier]: Vatertag
[karlgoethebier]: Listen and compare
[shmem]: karlgoethebier: es ist theologisch umstritten, ob jesus an christi himmelfahrt tatsächlich besoffen und mit bollerwagen zu seinem vater aufgebrochen ist
[karlgoethebier]: shmem: Ja ischweis

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2017-05-25 12:33 GMT
Find Nodes?
    Voting Booth?