in reply to Re^2: How to right align outputs of stored data in a variable?
in thread How to right align outputs of stored data in a variable?

A slight variation that would entail less space-futzing between the columns would be something like:

c:\@Work\Perl\monks>perl -wMstrict -le "use List::Util qw(sum); ;; my $Sum = sum my ($FreqP, $FreqN, $FreqZ) = map { int rand 41600 } 0. +.2; ;; my $fmt = qq{%-9s%16d \n}; printf $fmt, 'Freq(Z+):', $FreqP; printf $fmt, 'Freq(Z-):', $FreqN; printf $fmt, 'Freq(0):', $FreqZ; printf $fmt, 'Total:', $Sum; " Freq(Z+): 3107 Freq(Z-): 27423 Freq(0): 3837 Total: 34367


Give a man a fish:  <%-{-{-{-<