Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Get output AnyData script without header or data_row

by jZed (Prior)
on Dec 19, 2007 at 18:30 UTC ( [id://657946]=note: print w/replies, xml ) Need Help??


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().
  • Comment on Re: Get output AnyData script without header or data_row

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://657946]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-19 15:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found