Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: Numification of strings

by ww (Bishop)
on Aug 02, 2010 at 12:33 UTC ( #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
Node Status?
node history
Node Type: note [id://852462]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2014-07-12 14:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (240 votes), past polls