On Thu, 23 Dec 2004, John McCormick wrote: > i'm trying to figure out how to split a file delimited > by commas and newlines. > @data = split (/\n|\,/, <infile>) > the only problem is that some of the data fields are > strings enclosed in double quotes, and within some of > those double quotes are more commas. that's too > tricky for me. how do i do that? > thanks!
Use DBD::CSV to do the heavy lifting for you, and reduce the problem to a generic DBI database interaction program. Use CPAN and perldoc as appropriate to learn these modules. -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>