in reply to Removing decimals in number
You have a couple of options. The one I would go with is the int function. Like so:
print int('141.32124355465'); __OUTPUT__ 141
You could use a regular expression like:
my $num = 141.32124355465; $num =~ s/\.\d+$//; print $num; __OUTPUT__ 141
|
|---|