convert text file into html table

I have files with documentation information which i would like to put into a table, but i don't want to do it manually.  The files looks something like
             SECTION_KEY char (15) NOT NULL ,
             TERM char (5) NOT NULL ,
             CALL_NUMBER varchar (9) NULL ,
             DEPT char (4) NULL ,
             COURSE char (4) NULL ,
             SEC char (2) NULL ,
             TITLE varchar (32) NULL ,
             UNITS decimal(8, 2) NULL ,
             ACTIVITY1 char (3) NULL ,
 I want to have, for example section_key in column 1, char in column 2 and (5) in column 3.
Do i need a program to make this happen, and if so i would like to a code sample for that or something very similar.          
xoxomosAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ozoCommented:
#!/usr/bin/perl
print "Content-Type: text/html\n\n";
print "<html><head><title>convert text file into html table</title></head><body><table>";
while( <DATA> ){
    print '<tr><td>';
    print join'</td><td>',/(\w+)\s*(\w+)\s*(\([^)]*\))(.*)/;
    print "</td></tr>\n";
}
print "</table></body></html>\n";
__DATA__
             SECTION_KEY char (15) NOT NULL ,
             TERM char (5) NOT NULL ,
             CALL_NUMBER varchar (9) NULL ,
             DEPT char (4) NULL ,
             COURSE char (4) NULL ,
             SEC char (2) NULL ,
             TITLE varchar (32) NULL ,
             UNITS decimal(8, 2) NULL ,
             ACTIVITY1 char (3) NULL ,
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
xoxomosAuthor Commented:
Could you explain the 'print join' line?
thanks
0
ozoCommented:
perldoc -f join

    join EXPR,LIST
            Joins the separate strings of LIST into a single string
            with fields separated by the value of EXPR, and returns
            the string. Example:

                $_ = join(':', $login,$passwd,$uid,$gid,$gcos,$home,$shell);
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.