This is a little script to format numbers in Perl:
#!/usr/bin/perl #test data print myformat("1").$/; print myformat("213").$/; print myformat("333333").$/; print myformat("1231231.666").$/; print myformat("131233.54645").$/; print myformat("5553123123.44").$/; print myformat("55553123123.44").$/; print myformat("555553123123.44").$/; print myformat("5555553123123.44").$/; print myformat("55555553123123.44").$/; print myformat("555555553123123.44").$/; #format sub sub myformat { my ($f,$s) = split(/\./o,sprintf("%.2f",$_[0])); $f =~ s/(\d{3})(?:\.|$)/.$1/go while($f =~ /^\d{4}/o); return($f.(",$s")x!!(0+$s)); }
This is our result:
1 213 333.333 1.231.231,67 131.233,55 5.553.123.123,44 55.553.123.123,44 555.553.123.123,44 5.555.553.123.123,44 55.555.553.123.123,44 555.555.553.123.123,44
There’s certainly a lot to learn about this topic.
I like all of the points you made.
Write more, thats all I have to say. Literally, it seems as though you
relied on the video to make your point. You definitely know
what youre talking about, why waste your intelligence on just posting videos
to your weblog when you could be giving us something informative to read?
Hurrah! After all I got a blog from where I know how to
actually take helpful data concerning my study and
knowledge.