View Single Post
  #21  
Old 03-10-2015, 09:25 PM
epilz
Hill Giant
 
Join Date: Sep 2013
Posts: 247
Default

Nope. I have text_formatting.pl in my plugins folder.

Code:
###AKKADIUS###
###Usage plugin::commify(12302302); Would output value 12,302,302
sub commify {
   local $_  = shift;
   s{(?<!\d|\.)(\d{4,})}
    {my $n = $1;
     $n=~s/(?<=.)(?=(?:.{3})+$)/,/g;
     $n;
    }eg;
   return $_;
}

return 1;
Reply With Quote