Perlist at blogspot
2012/11/08
Efficient splitting every 3 digits
my $num = 12_345_678;
$num = reverse $num;
$num = reverse join( ' ', grep( $_, split( /(...)/g, $num ) ) );
# $num = '12 345 678';
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)