mirror of
https://git.freebsd.org/ports.git
synced 2025-06-21 20:50:31 -04:00
11 lines
372 B
Text
11 lines
372 B
Text
--- d Wed Feb 12 15:33:25 2003
|
|
+++ dblib.pl Wed Feb 12 15:33:39 2003
|
|
@@ -330,7 +330,7 @@
|
|
|
|
sub force_numeric {
|
|
my($value, $ignore_non_numeric) = @_;
|
|
- if ($value =~ /^[-+]?[0-9]+(.[0-9]+)?(e[-+0-9]+)?$/) {
|
|
+ if ($value =~ /^\s*[-+]?[0-9]+(.[0-9]+)?(e[-+0-9]+)?\s*$/) {
|
|
return $value + 0.0; # force numeric
|
|
} else {
|
|
if ($ignore_non_numeric) {
|