On Fri, 7 Dec 2001, Bill Jones wrote:
> Given -
>
> ++$number while $number =~
> s/^([-+]?\d+)(\d{3})/$1,$2/,
> print "$number\n";
>
>
> Question:
> Why does it keep starting over at 1,000 ???
>
> Enjoy!
> -Sx- :]
>
> as soon as $number hits 1000 you replace it with 1,000 which == 1 in numeric terms (i.e. when evaluating the ++). Si.
