in reply to
Base script behavior on presence (or non-) of a module
Others have already answered the actual question ...
But in part, because I'm a bit of a file-formats snob, and in part because I've been dealing with an e-mail discussion for the last month or so on trying to come up with standards on describing these sort of text files as used in space physics for time tagged data for event lists (vs. time series at a fixed cadence) ... as you mention you're in the astronomy field, have you considered spitting out VOTable? None of the perl libraries comply with the 1.2 spec unfortunately (and only the version in Astro::Catalog is actually in CPAN), but you should then be able to hand off the plotting work to dedicated tools like VOPlot (docs/examples).