in reply to Re: Dividing and format with regular expression the perl way
in thread Dividing and format
$num =~ s/\.(\d).*/.$1/; # perform the rounding (as string)
Oi Vay! Why (oh why) do you have that trailing dot-star in your regex? I see this with both neophyte and experienced RE users and I have yet figure out what misconception leads to this practice. Any ideas?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Dividing and format with regular expression the perl way
by Roger (Parson) on Nov 27, 2003 at 20:42 UTC | |
|
Re: Re: Re: Dividing and format with regular expression the perl way
by ysth (Canon) on Nov 27, 2003 at 20:39 UTC |