in reply to Removing decimals in number
Now if your question is how do I remove all the periods from a string, I would suggest:$number = int $number;
And finally, if you want to remove everything from the first ocurrence of something to the end of the string:$string =~ tr/.//d; # or $string =~ s/\.//g;
Cheers - L~R$string = substr( $string, 0, index($string, '.') ); # or ($string) = $string =~ /^([^.]*)/;
|
|---|