Printing a hash of hashes using an array for the headings and getting the columns to line up

Ask a Question related to PERL Miscellaneous, Design and Development.

  1. #1

    Default Printing a hash of hashes using an array for the headings and getting the columns to line up

    Hi All,

    I am trying to print out a report using a Hash of Hashes and am having
    trouble
    getting the columns to print out correctly. I have an array that contains
    the column
    headings in the correct order but I am stuck as how to get the HoH to use
    this information. I have provided a test script as to what I have tried.
    How can I get the script to print the columns in the correct order.

    Thanks

    Mothra



    #!/app/perl5.8.0/bin/perl
    use strict;
    use warnings;

    my @family = qw(UNIGRAPHICS_NX UNIGRAPHICS SOLID_EDGE WEBTOOLS other);

    my %people = (
    'wattsl' => {
    'SOLID_EDGE' => 3,
    'WEBTOOLS' => 10,
    'UNIGRAPHICS' => 19,
    'UNIGRAPHICS_NX' => 57
    },
    'friasd' => {
    'other' => 2,
    'SOLID_EDGE' => 10,
    'WEBTOOLS' => 25,
    'UNIGRAPHICS' => 21,
    'UNIGRAPHICS_NX' => 81
    },
    'yamaguch' => {
    'other' => 4,
    'SOLID_EDGE' => 12,
    'WEBTOOLS' => 11,
    'UNIGRAPHICS' => 9,
    'UNIGRAPHICS_NX' => 56
    },
    'jung' => {
    'other' => 2,
    'SOLID_EDGE' => 5,
    'WEBTOOLS' => 16,
    'UNIGRAPHICS' => 13,
    'UNIGRAPHICS_NX' => 39
    },
    'riches' => {
    'other' => 2,
    'SOLID_EDGE' => 18,
    'WEBTOOLS' => 24,
    'UNIGRAPHICS' => 10,
    'UNIGRAPHICS_NX' => 83
    },

    );

    printf "%24s %10s %10s %8s %5s \n", @family;

    foreach my $person( sort keys %people ) {

    printf "%9s %2d %2d %2d %2d %2d\n", $person,
    map { $people{$person}{$_} } sort keys %{ $people{$person} };

    }


    Mothra Guest

  2. Similar Questions and Discussions

    1. hash of hashes
      Hi all. How can I create $Subject for future population? -- Yours truly, WBR, Paul Argentoff. Jabber: paul@jabber.rtelekom.ru RIPE: PA1291-RIPE
    2. XML parse - hash of hashes
      Greetings, I am fairly new to Perl and to XML and I’m trying to (1) parse a XML document (snippet attached), (2) update specified data using a...
    3. Printing Array of Hashes
      Hi John, I received your code. Thanks. I would like to know how to check the values of the keys in the hash. I checked the Perl cookbook and...
    4. Accesing hash of hashes
      Hello: I am trying to create and access a multidimensional hash. For example the following works ====== $route {$routeDest} = $cost ; print...
    5. Sort a hash based on values in the hash stored as arrays of hashes
      Hmm. I'm not quite sure if I got the subject right, but I'll try to explain. :-) I've got a hash of elements stored like this: $VAR1 = {...
  3. #2

    Default Re: Printing a hash of hashes using an array for the headings and getting the columns to line up

    Mothra <mothra@nowhereatall.com> wrote:
    > I am trying to print out a report using a Hash of Hashes and am
    > having
    > trouble
    > getting the columns to print out correctly. I have an array that
    > contains the column
    > headings in the correct order but I am stuck as how to get the HoH
    > to use this information. I have provided a test script as to what
    > I have tried. How can I get the script to print the columns in the
    > correct order.
    >
    > Thanks
    >
    > Mothra
    >
    >
    >
    > #!/app/perl5.8.0/bin/perl
    > use strict;
    > use warnings;
    >
    > my @family = qw(UNIGRAPHICS_NX UNIGRAPHICS SOLID_EDGE WEBTOOLS
    > other);
    # Add this to construct a format strinf for printf()

    my $form_str = '%9s ' . join '', map '%' . (1 + length $_) . 's'
    => @family;

    >
    > my %people = (
    > 'wattsl' => {
    > 'SOLID_EDGE' => 3,
    > 'WEBTOOLS' => 10,
    > 'UNIGRAPHICS' => 19,
    > 'UNIGRAPHICS_NX' => 57
    > },
    > 'friasd' => {
    > 'other' => 2,
    > 'SOLID_EDGE' => 10,
    > 'WEBTOOLS' => 25,
    > 'UNIGRAPHICS' => 21,
    > 'UNIGRAPHICS_NX' => 81
    > },
    > 'yamaguch' => {
    > 'other' => 4,
    > 'SOLID_EDGE' => 12,
    > 'WEBTOOLS' => 11,
    > 'UNIGRAPHICS' => 9,
    > 'UNIGRAPHICS_NX' => 56
    > },
    > 'jung' => {
    > 'other' => 2,
    > 'SOLID_EDGE' => 5,
    > 'WEBTOOLS' => 16,
    > 'UNIGRAPHICS' => 13,
    > 'UNIGRAPHICS_NX' => 39
    > },
    > 'riches' => {
    > 'other' => 2,
    > 'SOLID_EDGE' => 18,
    > 'WEBTOOLS' => 24,
    > 'UNIGRAPHICS' => 10,
    > 'UNIGRAPHICS_NX' => 83
    > },
    >
    > );
    >
    > printf "%24s %10s %10s %8s %5s \n", @family;
    >
    > foreach my $person( sort keys %people ) {
    >
    > printf "%9s %2d %2d %2d %2d %2d\n",
    > $person,
    > map { $people{$person}{$_} } sort keys %{ $people{$person}
    > };
    >
    >}
    printf "$form_str\n", ' ', @family;

    foreach my $person( sort keys %people ) {
    printf "$form_str\n", $person,
    map { $people{$person}{$_} } @family;
    }


    --
    David Wall
    David K. Wall Guest

  4. #3

    Default Re: Printing a hash of hashes using an array for the headings and getting the columns to line up

    Hi David,

    "David K. Wall" <usenet@dwall.fastmail.fm> wrote in message
    news:Xns93F27CE764669dkwwashere@216.168.3.30...
    > Mothra <mothra@nowhereatall.com> wrote:
    >
    [snipped]

    Thanks for replying :)
    > # Add this to construct a format strinf for printf()
    >
    > my $form_str = '%9s ' . join '', map '%' . (1 + length $_) . 's'
    > => @family;
    >
    >
    Ok, generate a form.

    [more snippage]
    > printf "$form_str\n", ' ', @family;
    >
    > foreach my $person( sort keys %people ) {
    > printf "$form_str\n", $person,
    > map { $people{$person}{$_} } @family;
    > }
    >
    I added this and receive:
    Use of uninitialized value in printf at F:\scripts\rep.pl line 52.
    I think this is because of the wattsl value is missing the
    'other' key value. After checking the orginal test script I found
    that I was forcing a %2d in the format line.

    I went back and reran the test script I orginally wrote and did not
    receive the uninitialized value warning. I wonder why I did not receive
    a warning? Any way, for now do you know of a good
    way to remove the warning? (other that commenting out the use warnings
    line).

    Thanks

    Mothra


    Mothra Guest

  5. #4

    Default Re: Printing a hash of hashes using an array for the headings and getting the columns to line up

    Mothra <mothra@nowhereatall.com> wrote:
    >"David K. Wall" <usenet@dwall.fastmail.fm> wrote in message
    >news:Xns93F27CE764669dkwwashere@216.168.3.30...
    >>
    >> printf "$form_str\n", ' ', @family;
    >>
    >> foreach my $person( sort keys %people ) {
    >> printf "$form_str\n", $person,
    >> map { $people{$person}{$_} } @family;
    >> }
    >>
    > I added this and receive:
    > Use of uninitialized value in printf at F:\scripts\rep.pl line 52.
    I noticed the missing value and got the same warning message, but
    since you didn't seem to care I didn't either.


    foreach my $person( sort keys %people ) {
    printf "$form_str\n", $person,
    map { $people{$person}{$_} or 0 } @family;
    }

    Replace the '0' with whatever value is appropriate.

    --
    David Wall
    David K. Wall Guest

  6. #5

    Default Re: Printing a hash of hashes using an array for the headings andgetting the columns to line up

    Mothra wrote:
    >
    > I am trying to print out a report using a Hash of Hashes and am having
    > trouble getting the columns to print out correctly. I have an array that
    > contains the column headings in the correct order but I am stuck as how
    > to get the HoH to use this information. I have provided a test script as
    > to what I have tried. How can I get the script to print the columns in
    > the correct order.
    >
    > [snip]
    >
    > my @family = qw(UNIGRAPHICS_NX UNIGRAPHICS SOLID_EDGE WEBTOOLS other);
    >
    > [snip]
    >
    > printf "%24s %10s %10s %8s %5s \n", @family;
    >
    > foreach my $person( sort keys %people ) {
    >
    > printf "%9s %2d %2d %2d %2d %2d\n", $person,
    > map { $people{$person}{$_} } sort keys %{ $people{$person} };
    > }

    printf "%9s %2d %2d %2d %2d %2d\n",
    $person, @{ $people{ $person } }{ @family };



    John
    --
    use Perl;
    program
    fulfillment
    John W. Krahn Guest

  7. #6

    Default Re: Printing a hash of hashes using an array for the headings and getting the columns to line up


    "David K. Wall" <usenet@dwall.fastmail.fm> wrote in message
    news:Xns93F29150BF9E5dkwwashere@216.168.3.30...
    > Mothra <mothra@nowhereatall.com> wrote:
    >
    > >"David K. Wall" <usenet@dwall.fastmail.fm> wrote in message
    > >news:Xns93F27CE764669dkwwashere@216.168.3.30...
    > >>
    [snipped]
    >
    > I noticed the missing value and got the same warning message, but
    > since you didn't seem to care I didn't either.
    Hmn, now I am confused, how did you come to the conclusion that I didn't
    seem to care?
    In my orginal post the code I posted did not generate the warning.
    >
    >
    > foreach my $person( sort keys %people ) {
    > printf "$form_str\n", $person,
    > map { $people{$person}{$_} or 0 } @family;
    > }
    >
    > Replace the '0' with whatever value is appropriate.
    >
    Yep!! this works great!!!
    Thanks very much!!

    Mothra


    Mothra Guest

  8. #7

    Default Re: Printing a hash of hashes using an array for the headings and getting the columns to line up

    Mothra <mothra@nowhereatall.com> wrote:
    >
    > "David K. Wall" <usenet@dwall.fastmail.fm> wrote in message
    > news:Xns93F29150BF9E5dkwwashere@216.168.3.30...
    >> Mothra <mothra@nowhereatall.com> wrote:
    >>
    >> >"David K. Wall" <usenet@dwall.fastmail.fm> wrote in message
    >> >news:Xns93F27CE764669dkwwashere@216.168.3.30...
    >> >>
    > [snipped]
    >>
    >> I noticed the missing value and got the same warning message, but
    >> since you didn't seem to care I didn't either.
    >
    > Hmn, now I am confused, how did you come to the conclusion that I
    > didn't seem to care?
    > In my orginal post the code I posted did not generate the warning.
    I copied, pasted, and ran the original code unaltered, and got this
    output:

    Use of uninitialized value in printf at E:\perlprog\junk.pl line 50.
    UNIGRAPHICS_NX UNIGRAPHICS SOLID_EDGE WEBTOOLS other
    friasd 10 21 81 25 2
    jung 5 13 39 16 2
    riches 18 10 83 24 2
    wattsl 3 19 57 10 0
    yamaguch 12 9 56 11 4


    Looks like a warning to me.

    >
    >>
    >>
    >> foreach my $person( sort keys %people ) {
    >> printf "$form_str\n", $person,
    >> map { $people{$person}{$_} or 0 } @family;
    >> }
    >>
    >> Replace the '0' with whatever value is appropriate.
    >>
    > Yep!! this works great!!!
    > Thanks very much!!
    You're welcome.

    --
    David Wall
    David K. Wall Guest

  9. #8

    Default Re: Printing a hash of hashes using an array for the headings and getting the columns to line up


    "David K. Wall" <usenet@dwall.fastmail.fm> wrote in message
    news:Xns93F29F04AC5A9dkwwashere@216.168.3.30...
    > Mothra <mothra@nowhereatall.com> wrote:
    >
    > >
    > > "David K. Wall" <usenet@dwall.fastmail.fm> wrote in message
    > > news:Xns93F29150BF9E5dkwwashere@216.168.3.30...
    > >> Mothra <mothra@nowhereatall.com> wrote:
    > >>
    > >> >"David K. Wall" <usenet@dwall.fastmail.fm> wrote in message
    > >> >news:Xns93F27CE764669dkwwashere@216.168.3.30...
    > >> >>
    > > [snipped]
    > >>
    > >> I noticed the missing value and got the same warning message, but
    > >> since you didn't seem to care I didn't either.
    > >
    > > Hmn, now I am confused, how did you come to the conclusion that I
    > > didn't seem to care?
    > > In my orginal post the code I posted did not generate the warning.
    >
    > I copied, pasted, and ran the original code unaltered, and got this
    > output:
    >
    > Use of uninitialized value in printf at E:\perlprog\junk.pl line 50.
    [snipped]

    I think I know what is going on.

    F:\scripts>x.pl
    UNIGRAPHICS_NX UNIGRAPHICS SOLID_EDGE WEBTOOLS other
    friasd 10 21 81 25 2
    jung 5 13 39 16 2
    riches 18 10 83 24 2
    wattsl 3 19 57 10 0
    yamaguch 12 9 56 11 4

    F:\scripts>perl -v

    This is perl, v5.6.1 built for MSWin32-x86-multi-thread
    (with 1 registered patch, see perl -V for more detail)

    I knew I was not going crazy.
    then this.

    F:\scripts>x.pl
    UNIGRAPHICS_NX UNIGRAPHICS SOLID_EDGE WEBTOOLS other
    friasd 10 21 81 25 2
    jung 5 13 39 16 2
    riches 18 10 83 24 2
    Use of uninitialized value in printf at F:\scripts\x.pl line 50.
    wattsl 3 19 57 10 0
    yamaguch 12 9 56 11 4

    F:\scripts>perl -v

    This is perl, v5.8.0 built for MSWin32-x86-multi-thread

    I guess I need to use the latest version of perl, Sorry about that :)

    Thanks

    Mothra


    Mothra Guest

  10. #9

    Default Re: Printing a hash of hashes using an array for the headings and getting the columns to line up

    Mothra <mothra@nowhereatall.com> wrote in comp.lang.perl.misc:
    > Hi All,
    >
    > I am trying to print out a report using a Hash of Hashes and am having
    > trouble
    > getting the columns to print out correctly. I have an array that contains
    > the column
    > headings in the correct order but I am stuck as how to get the HoH to use
    > this information. I have provided a test script as to what I have tried.
    > How can I get the script to print the columns in the correct order.
    >
    > Thanks
    >
    > Mothra
    >
    >
    >
    > #!/app/perl5.8.0/bin/perl
    > use strict;
    > use warnings;
    >
    > my @family = qw(UNIGRAPHICS_NX UNIGRAPHICS SOLID_EDGE WEBTOOLS other);
    >
    > my %people = (
    > 'wattsl' => {
    > 'SOLID_EDGE' => 3,
    > 'WEBTOOLS' => 10,
    > 'UNIGRAPHICS' => 19,
    > 'UNIGRAPHICS_NX' => 57
    > },
    > 'friasd' => {
    > 'other' => 2,
    > 'SOLID_EDGE' => 10,
    > 'WEBTOOLS' => 25,
    > 'UNIGRAPHICS' => 21,
    > 'UNIGRAPHICS_NX' => 81
    > },
    > 'yamaguch' => {
    > 'other' => 4,
    > 'SOLID_EDGE' => 12,
    > 'WEBTOOLS' => 11,
    > 'UNIGRAPHICS' => 9,
    > 'UNIGRAPHICS_NX' => 56
    > },
    > 'jung' => {
    > 'other' => 2,
    > 'SOLID_EDGE' => 5,
    > 'WEBTOOLS' => 16,
    > 'UNIGRAPHICS' => 13,
    > 'UNIGRAPHICS_NX' => 39
    > },
    > 'riches' => {
    > 'other' => 2,
    > 'SOLID_EDGE' => 18,
    > 'WEBTOOLS' => 24,
    > 'UNIGRAPHICS' => 10,
    > 'UNIGRAPHICS_NX' => 83
    > },
    >
    > );
    >
    > printf "%24s %10s %10s %8s %5s \n", @family;
    >
    > foreach my $person( sort keys %people ) {
    >
    > printf "%9s %2d %2d %2d %2d %2d\n", $person,
    > map { $people{$person}{$_} } sort keys %{ $people{$person} };
    >
    > }
    I can't resist the temptation to plug my module Text::Table. Here
    is how:

    use Text::Table;

    my $tb = Text::Table->new( 'name', @family);
    $tb->add( $_, @{ $people{ $_}}{ @family}) for sort keys %people;

    print $tb;

    The advantage is that it figures out the alignment for you, that is,
    you don't have to write and maintain the printf format.

    Anno
    Anno Siegel Guest

  11. #10

    Default Re: Printing a hash of hashes using an array for the headings and getting the columns to line up

    Hi Anno,

    "Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote in message
    news:bjpp9q$7o$4@mamenchi.zrz.TU-Berlin.DE...
    [snipped]
    >
    > I can't resist the temptation to plug my module Text::Table. Here
    > is how:
    >
    > use Text::Table;
    >
    > my $tb = Text::Table->new( 'name', @family);
    > $tb->add( $_, @{ $people{ $_}}{ @family}) for sort keys %people;
    >
    > print $tb;
    >
    > The advantage is that it figures out the alignment for you, that is,
    > you don't have to write and maintain the printf format.
    >
    Oh, that is cool!!!
    Off to CPAN I go :-)

    Mothra


    Mothra Guest

  12. #11

    Default Re: Printing a hash of hashes using an array for the headings and getting the columns to line up

    Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
    > I can't resist the temptation to plug my module Text::Table. Here
    > is how:
    >
    > use Text::Table;
    >
    > my $tb = Text::Table->new( 'name', @family);
    > $tb->add( $_, @{ $people{ $_}}{ @family}) for sort keys
    > %people;
    >
    > print $tb;
    >
    > The advantage is that it figures out the alignment for you, that
    > is, you don't have to write and maintain the printf format.
    I like it, and I have a project at hand for which it is very useful.
    Thank you!

    But there's one thing I haven't been able to figure out, and that's
    how to right-align a column title. For example,

    use Text::Table;
    my $tb = Text::Table->new("TLA");
    $tb->load( qw(188.52 0.00 97.36 185.51) );
    print $tb;

    produces

    TLA
    188.52
    0.00
    97.36
    185.51

    What I want to produce is

    TLA
    188.52
    0.00
    97.36
    185.51


    Maybe I'm being obtuse or haven't read the docs closely enough, but I
    don't see how to do this.

    --
    David Wall
    David K. Wall Guest

  13. #12

    Default Re: Printing a hash of hashes using an array for the headings and getting the columns to line up

    David K. Wall <usenet@dwall.fastmail.fm> wrote in comp.lang.perl.misc:
    > Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
    >
    > > I can't resist the temptation to plug my module Text::Table. Here
    > > is how:
    > >
    > > use Text::Table;
    > >
    > > my $tb = Text::Table->new( 'name', @family);
    > > $tb->add( $_, @{ $people{ $_}}{ @family}) for sort keys
    > > %people;
    > >
    > > print $tb;
    > >
    > > The advantage is that it figures out the alignment for you, that
    > > is, you don't have to write and maintain the printf format.
    >
    > I like it, and I have a project at hand for which it is very useful.
    > Thank you!
    >
    > But there's one thing I haven't been able to figure out, and that's
    > how to right-align a column title. For example,
    >
    > use Text::Table;
    > my $tb = Text::Table->new("TLA");
    > $tb->load( qw(188.52 0.00 97.36 185.51) );
    > print $tb;
    >
    > produces
    >
    > TLA
    > 188.52
    > 0.00
    > 97.36
    > 185.51
    >
    > What I want to produce is
    >
    > TLA
    > 188.52
    > 0.00
    > 97.36
    > 185.51
    >
    >
    > Maybe I'm being obtuse or haven't read the docs closely enough, but I
    > don't see how to do this.
    That's because you can't. Sorry.

    In fact there's too little user control over alignment in more respects,
    title-to-body alignment is just one of them. It will be the first thing
    to fix if there is another release, but I'm not yet sure how to do it.

    The problem isn't that these features are hard to implement, but how
    to squeeze them into the user interface, which isn't exactly a beauty
    to begin with. In fact, that's why I left them out in the first place,
    that, and that I'd have to describe them all. I thought I'd get away
    with it, but you're not the first to complain.

    Anno
    Anno Siegel Guest

  14. #13

    Default Re: Printing a hash of hashes using an array for the headings and getting the columns to line up

    Anno Siegel wrote:

    [regarding Text::Table]
    > In fact there's too little user control over alignment in more respects,
    > title-to-body alignment is just one of them. It will be the first thing
    > to fix if there is another release, but I'm not yet sure how to do it.
    >
    > The problem isn't that these features are hard to implement, but how
    > to squeeze them into the user interface, which isn't exactly a beauty
    > to begin with. In fact, that's why I left them out in the first place,
    > that, and that I'd have to describe them all. I thought I'd get away
    > with it, but you're not the first to complain.
    I haven't examined the internals closely, so I may be way off-base here, but
    since it already allows users to define columns with hashes, wouldn't that be
    the obvious place to add new features for column formats? But I'd guess
    you're looking at far more features than I have in mind, so I'll shut up
    before I embarrass myself *too* much. :-)

    David K. Wall Guest

  15. #14

    Default Re: Printing a hash of hashes using an array for the headings and getting the columns to line up

    David K. Wall <usenet@dwall.fastmail.fm> wrote in comp.lang.perl.misc:
    > Anno Siegel wrote:
    >
    > [regarding Text::Table]
    >
    > > In fact there's too little user control over alignment in more respects,
    > > title-to-body alignment is just one of them. It will be the first thing
    > > to fix if there is another release, but I'm not yet sure how to do it.
    > >
    > > The problem isn't that these features are hard to implement, but how
    > > to squeeze them into the user interface, which isn't exactly a beauty
    > > to begin with. In fact, that's why I left them out in the first place,
    > > that, and that I'd have to describe them all. I thought I'd get away
    > > with it, but you're not the first to complain.
    >
    > I haven't examined the internals closely, so I may be way off-base here, but
    > since it already allows users to define columns with hashes, wouldn't that be
    > the obvious place to add new features for column formats?
    That is very probably what will happen.
    > you're looking at far more features than I have in mind, so I'll shut up
    > before I embarrass myself *too* much. :-)
    I'm also playing with a more radical redesign where table columns would
    become independent objects, but I think I'll go for a quick fix.

    Anno
    Anno Siegel Guest

  16. #15

    Default Re: Printing a hash of hashes using an array for the headings and getting the columns to line up

    Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote in comp.lang.perl.misc:
    > David K. Wall <usenet@dwall.fastmail.fm> wrote in comp.lang.perl.misc:
    > > Anno Siegel wrote:
    > >
    > > [regarding Text::Table]
    > >
    > > I haven't examined the internals closely, so I may be way off-base
    > > here, but since it already allows users to define columns with hashes,
    > > wouldn't that be the obvious place to add new features for column
    > > formats?
    >
    > That is very probably what will happen.
    You can now (well, after the version propagates) control the alignment
    of titles with the body through the key "align_title" in the
    hash-specification, much like you suggested.

    One feature draws another by the tail... So similarly, "align_title_lines"
    controls the alignment of title lines among themselves for muiltiline
    titles.

    Anno
    Anno Siegel Guest

  17. #16

    Default Re: Printing a hash of hashes using an array for the headings and getting the columns to line up

    Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:

    [re Text::Table]
    > You can now (well, after the version propagates) control the
    > alignment of titles with the body through the key "align_title" in
    > the hash-specification, much like you suggested.
    >
    > One feature draws another by the tail... So similarly,
    > "align_title_lines" controls the alignment of title lines among
    > themselves for muiltiline titles.
    Oh my. I was reading the module and trying to understand how it works
    so that /maybe/ I could send you a patch. So far all I had
    accomplished was screwing things up. If you're ever in Cincinnati I'll
    buy you a beer, or if not a beer, some Skyline chili. :-)

    --
    David Wall
    David K. Wall Guest

  18. #17

    Default Re: Printing a hash of hashes using an array for the headings andgetting the columns to line up

    "David K. Wall" wrote:
    >
    > Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
    >
    > > You can now (well, after the version propagates) control the
    > > alignment of titles with the body through the key "align_title" in
    > > the hash-specification, much like you suggested.
    > >
    > > One feature draws another by the tail... So similarly,
    > > "align_title_lines" controls the alignment of title lines among
    > > themselves for muiltiline titles.
    >
    > Oh my. I was reading the module and trying to understand how it works
    > so that /maybe/ I could send you a patch. So far all I had
    > accomplished was screwing things up. If you're ever in Cincinnati I'll
    > buy you a beer, or if not a beer, some Skyline chili. :-)
    Are you saying that beer and Skyline chili are interchangable in
    Cincinnati? That's either strong beer or weak chili. :-)


    John
    --
    use Perl;
    program
    fulfillment
    John W. Krahn Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139