laziness, impatience, and hubris | |
PerlMonks |
Re: Re: Parse float from stringby samurai (Monk) |
on Nov 05, 2002 at 00:22 UTC ( [id://210348]=note: print w/replies, xml ) | Need Help?? |
Unfortunately, that won't catch the period character. I would use transliteration, IF you know what characters you should ignore. $string =~ y/A-Za-z //d; That'll remove alphabeticals and spaces. However, you may have to specify more characters if there's more garbage in your $string's.
--
In Section
Seekers of Perl Wisdom
|
|