in reply to Re: Re: Parse float from string
in thread Parse float from string

Sorry if I misread - the original poster had a parseInt() sub defined...
To parse a float:
sub parseFloat { my $str = shift; $str =~ /([\d\.]+)/; return $1; }
Michael

Replies are listed 'Best First'.
Re^4: Parse float from string
by lanthruster (Initiate) on Nov 24, 2019 at 01:18 UTC
    That is not going to work for: -11.10 11.10.11