in reply to Straighten MySQL Table Displays

If you have to do this again, and for some reason can't use the DBI module to connect to MySQL (which makes this problem easy!), you might try looking at the built-in mysql tool 'mysqldump'. It's a much better design for getting this kind of data dump - you can specify your own field separators, and basically have a lot more options that might make things signifigantly easier to format.

Of course, if you _can_ run a perl script on a machine that is allowed to talk to the MySQL database (and you can configure MySQL to allow particular remote machines in - it's mildly complex, but the docs on mysql.com do spell it out), then things become nice. Use the DBI module, and you can read the fields directly into an array, which allows you to take full advantage of perl's formatting.

Not that your script isn't useful - I've written similar, to get to a brio database in the unfortunate past - but with mysql, you hopefully don't have to work that hard.

-- Kirby

Tuxtops: Laptops with Linux!