Hello Ken
I've read printf FORMAT LIST and edited your program to learn how it behaves; however, I do not understand it completely, can you explain some things I am still doubtful?
So, I edited your $fmt statement and tried to left-adjust and play with the spaces in between columns; however, I cannot understand the spaces between the 3rd and 4th columns.
my $fmt = "%-13s % 24f %-24f %-4s\n %38.6f %14f %-4s\n";the output of some of the 2nd columns seems to be left-justified except when the number is negative. How can that negative be moved in one more space so everything is left-justified?
And, the spacing between the 3rd and 4th columns are not clear to me yet? I know that Between the % and the format letter, some attributes control the interpretation, Can you explain how these spaces are moved in the 3rd and 4th fields?
MM_STD_gate 152.401574 -22.047244 mils 3871.000000 -560.000000 microns RFN_a 337.244094 0.787402 mils 8566.000000 20.000000 microns RFN_b 366.181102 0.787402 mils 9301.000000 20.000000 microns RFN_c 376.929133 0.787402 mils 9574.000000 20.000000 microns MM_STD2_gate -259.488188 -22.047244 mils -6591.000000 -560.000000 microns RBASE_right_2 -366.181102 -33.464566 mils -9301.000000 -850.000000 microns
I'll like to see all columns left-justified (the negative number is also left-justified with the number below or above) and little bigger spaces in between. Note, that there can only be 6 decimal numbers in columns and upto 13-character string name is allowed.
MM_STD_gate 152.401574 -22.047244 mils 3871.000000 -560.000000 microns RFN_a 337.244094 0.787402 mils 8566.000000 20.000000 microns RFN_b 366.181102 0.787402 mils 9301.000000 20.000000 microns RFN_c 376.929133 0.787402 mils 9574.000000 20.000000 microns MM_STD2_gate -259.488188 -22.047244 mils -6591.000000 -560.000000 microns RBASE_right_2 -366.181102 -33.464566 mils -9301.000000 -850.000000 microns
thanks for the explanations!
In reply to Re^2: Help with Creating a Table from array ref I parsed in
by perlynewby
in thread Help with Creating a Table from array ref I parsed in
by perlynewby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |