Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • by hdp (1658) on 2008.06.24 12:11 (#63592) Journal

    Have fun reading the docs to figure that out :)

    I'm skeptical. I admit to having ever used Text::Table before, but not much, and it didn't take more than a glance at the docs to figure out how to do what you want:

    my $t = Text::Table->new(\'| ', 'Time', \' | ', 'Text', \' |');
    $t->load(... some data ...);
    my $rule = $t->rule(qw(- +));
    print $rule, $t->head, $rule, $t->body, $rule;

    I'm not claiming to be overly fond of the interface -- any time I have to do \'foo' it trips my fingers up -- but I've read documentation that's far worse.