[ale] center justification in column using awk or perl

Fletch fletch at phydeaux.org
Wed Jun 19 21:31:48 EDT 2002


>>>>> "Dow" == Dow Hurst <dhurst at kennesaw.edu> writes:

    Dow> I need to center justify a column either using awk or perl.
    Dow> I understand the awk printf command at the command line and
    Dow> don't see a way to use it to do this.  I am looking at the
    Dow> format/write statements in Perl, which will do what I want.
    Dow> Here is the code I have to work with in Perl currently that
    Dow> needs to be transformed from a printf to a format/write.

[...]


        If you haven't cleared it up yet, perldoc perlform has all of
the details on formats.  If you don't mind installing extra modules,
you might want to also look at Text::Autoformat and use it to clean up
after the fact.

-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch at phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
770 933-0600 x211(w)  |  scary questions." -- Jules                =(___)=
770 294-0820 (m)      |                                               U

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list