http://qs321.pair.com?node_id=657946


in reply to Get output AnyData script without header or data_row

DBD::AnyData can handle column names two ways: by default it looks for them as the first record in the file and treats that row as a header, not as a data row. However, if you specifically set the column names (as you do in the script above), then it will assume that the first row is data, not a header. So to get it to work as you want, just take out the col_names specification in your ad_catalog().

Replies are listed 'Best First'.
Re^2: Get output AnyData script without header or data_row
by GertMT (Hermit) on Dec 19, 2007 at 18:39 UTC
    Okay, I'm going to 'close' the file but obviously also take advantage of this explanation.

    Thanks, great module.
      I think what you'll want to do is have two ad_catalog() calls - the first to read the existing files with headers should not specify col_names, the second, to write a new file without headers should specify col_names. That way you do it all with the DBD and don't have to do any explicit file opening, writing, or closing.