Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: result is not listening to if

by thanos1983 (Parson)
on Jul 14, 2017 at 14:36 UTC ( [id://1195126]=note: print w/replies, xml ) Need Help??


in reply to Re^2: result is not listening to if
in thread result is not listening to if

Hello again prospect,

Regarding your question you can find a very similar question on the forum that contains many interesting answers: A function to determine if a string is numeric, similarly How to determine if something is numeric?.

A most common way to convert a numerical string to int is casting int. For example from documentation:

For example, int(-6.725/0.025) produces -268 rather than the correct - +269; that's because it's really more like -268.99999999999994315658 i +nstead.

Hope this helps, BR.

Seeking for Perl wisdom...on the process of learning...not there...yet!

Log In?
Username:
Password:

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

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

    No recent polls found