Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Numification of strings

by ww (Archbishop)
on Aug 02, 2010 at 12:33 UTC ( [id://852462]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -we "$x="LanX"; print ($x * 3);"
    Argument "LanX" isn't numeric in multiplication (*) at -e line 1.
    0
    ...
    perl -we "$x="LanX"; print (3**$x);"
    Argument "LanX" isn't numeric in exponentiation (**) at -e line 1.
    1
    
  2. or download this
    perl -we "$x='7LanX'; print (3^$x);"
    Argument "7LanX" isn't numeric in bitwise xor (^) at -e line 1.
    4
    ...
    perl -we "$x='7LanX'; print (3**$x);"
    Argument "7LanX" isn't numeric in exponentiation (**) at -e line 1.
    2187
    
  3. or download this
    perl -we "$x=\"5\"; print ($x*3);"  # 2
    15
    perl -we "$x='5'; print ($x*3);"
    15
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-25 21:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found