How would I convert a string holding a number into its numeric value in Perl?
转载于:https://stackoverflow.com/questions/288900/how-can-i-convert-a-string-to-a-number-in-perl
How would I convert a string holding a number into its numeric value in Perl?
转载于:https://stackoverflow.com/questions/288900/how-can-i-convert-a-string-to-a-number-in-perl
You don't need to convert it at all:
% perl -e 'print "5.45" + 0.1;'
5.55