Skip to content

Instantly share code, notes, and snippets.

@olegwtf
Created April 19, 2012 16:57
Show Gist options
  • Save olegwtf/2422284 to your computer and use it in GitHub Desktop.
Save olegwtf/2422284 to your computer and use it in GitHub Desktop.
split number by thousands
my $str = '0123456789';
$str =~ s/(?<=.)(?=(?:\d{3})+$)/ /g;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment