in reply to plain text table

Didn't merlyn write an article for TPJ discussing the use of formats to make data look the way you want it to look?

Look into formats. They may be old, but they are still handy.

Learning Perl has a good example of it:

#!/usr/bin/perl -w while (my $filename = <*.secret>) { open(WORDSLIST, $filename); if (-M WORDSLIST < 7) { while (my $name = <WORDSLIST>) { chop($name); my $word = <WORDSLIST>; chop($word); write; # invoke format STDOUT to STDOUT } } } format STDOUT = @<<<<<<<<<<<<<<< @<<<<<<<<<< @<<<<<<<<<< $filename, $name, $word . format STDOUT_TOP = Page @<< $% Filename Name Word ================ =========== =========== .

I hope this helps.

J. J. Horner
Linux, Perl, Apache, Stronghold, Unix
jhorner@knoxlug.org http://www.knoxlug.org/

Replies are listed 'Best First'.
RE: Re: plain text table
by merlyn (Sage) on Jul 11, 2000 at 18:14 UTC
    I didn't do an article for TPJ, but one of my early WebTechniques columns talked about having tabular data spit out as a table for table browsers and text for text browsers. I later rejected the error of my ways though, so I don't recommend that information any more.

    -- Randal L. Schwartz, Perl hacker