This technique is very useful
Lookahead and lookbehind are both very useful indeed, but I think your example is better solved with a sexeger:
$amount = reverse $amount; $amount =~ s/(\d{3})/$1,/g; $amount = reverse $amount;
Update: oops, I guess my example doesn't commafy a floating-point number, now does it? Oh well. At least maybe someone will learn about sexegers who didn't know about them. 8^)
In reply to Re^2: Problem With Split
by revdiablo
in thread Problem With Split
by debiandude
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |