in reply to changing a string to a numeric variable
The following splits the line into words, then kills any embedded commas.
$_ = 'word 15,000 word word 20,000'; my @a = grep {s/(?<=\d),(?=\d)//g || $_} split;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: changing a string to a numeric variable
by kappa (Chaplain) on Mar 18, 2004 at 22:39 UTC | |
by pbeckingham (Parson) on Mar 19, 2004 at 00:24 UTC | |
by kappa (Chaplain) on Mar 19, 2004 at 12:54 UTC |