in reply to Using perl as an editor for sql queries (code)
By the way, DBI comes with a perl SQL shell called dbish. That's a good place to start when doing this kind of thing.