As posted, /me wants to know what is the Perl nexus? You seem to be saying you have a
vi question since the perl script ( cfacr.pl
? )is done before you can work out the spacing: is that true, or would you like to post some code that shows why this is a SOPW question?
Update for clarity and order: Maybe you should re-write the "script" to count digits in your dollar amounts, if they're available to you in the form you show. </update>
OTOH, and w_a_a_ a _ y out in a WAG: have you considered such operators as reverse which might be useful to bring you to largest $number first, after which spacing and decimal alignment is, at least, possible.
Alternately, tell us where the "fac" values come from. Your sample data suggests they are nothing more or less than shortened forms of your $. That suggests, to /me, that you might count the digits before the decimal (or missing decimal) to determine you alignment needs. and if the fac values come from some representation of the $numbers, work the problem from the $numbers.
Or, perhaps working on clarity of exposition (and precision and completeness) might suggest other ways to do business.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.