Monthly Archives: December 2009

Perl Script – Text File to a Table

I could not find a utility to turn a delimited text file into an ASCII table. So I built a simple one in Perl. It builds on this work by preparing the data for it.

The user creates a file with some delimiter, such as a Comma-Separated Values file, and then runs it through the script. The table is sent to standard output, and the user can do what they want with it.

It is run as such:

perl TextFileToTable.pl [delimiter] [file to be read]

For instance:

perl TextFileToTable.pl \& data.txt

The order is important.

The code, in an archive.

Leave a comment

Filed under Computing, Content