perl convert a string to a number

All you have to do is call int to change a string to a int

my $someint = int($somestring);


Guillermo said…
How can you convert to a float? I need to keep my decimal value. Cheers.
Guillermo said…
Ah, to keep the decimal value one should use sprintf.

Thanks anyway.

Popular posts from this blog

Vim vi how to reload a file your editing