in reply to Re: changing a string to a numeric variable
in thread changing a string to a numeric variable
...will of course lose data.$_ = 'word 0 word'; my @a = grep {s/(?<=\d),(?=\d)//g || $_} split;
...will be better (as if there can be one wrong way better of another wrong way), but lose data too, btw.$_ = 'word 0 word0,0word'; my @a = map {s/(?<=\d),(?=\d)//g; $_} split;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: changing a string to a numeric variable
by pbeckingham (Parson) on Mar 19, 2004 at 00:24 UTC | |
by kappa (Chaplain) on Mar 19, 2004 at 12:54 UTC |