in reply to Re: Re: changing a string to a numeric variable
in thread changing a string to a numeric variable

Tell me how it would "of course" lose data? It does work.

  • Comment on Re: Re: Re: changing a string to a numeric variable

Replies are listed 'Best First'.
Re: Re: Re: Re: changing a string to a numeric variable
by kappa (Chaplain) on Mar 19, 2004 at 12:54 UTC
    web07:~[0]% perl $_ = 'word 0 word'; my @a = grep {s/(?<=\d),(?=\d)//g || $_} split; print join ':', @a, "\n"; ^D word:word: web07:~[0]%
    That '0' vanished because the grep-condition (s/...//g || $_) is false and grep is a filter.