But I'd recommend checking out Regexp::Common::number which will cover many more cases.if ( $var =~ /^-?\d+(\.\d+)?$/ ){ # you have a float }
In reply to Re: dependable way to test for a float
by davidrw
in thread dependable way to test for a float
by vindaloo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |