You cannot actual replace a zero-width assertion.$_ = "9876543"; s/(?=..)$/./; say; __END__ 9876543
And before benchmarking, you should always check whether you're producing the correct results. Bogus solutions noone cares for, even if they're fast.
In reply to Re^3: Print Number With Implied Decimal Point
by JavaFan
in thread Print Number With Implied Decimal Point
by j355ga
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |