in reply to Re: Auto-dailies
in thread Auto-dailies
if you are dealing with numbers like 1,000,000, you'll want to add a 'g' flag to the substitution.Something like:
perhaps? Actually that wouldn't work because the two regexes overlap... You're trying to take '1,234,567' and squeeze the '234' grouping into $2 for the first match, and $1 for the next one.s/(\d+),(\d+)/$1$2/g for ($aolstats,$msnstats,$wwwstats);
Since the comment in the original code reads: "Get rid of the comma in stats", I would write it like this:
tr/,//d for $aolstats, $msnstats, $wwwstats;
-Blake
|
|---|