There's a module called DBD::CSV, which will probably solve your problem. CPAN is
good at that :).  You can tell it what the field separator is and then you'll be
able to manipulate it however you want with the DBI. I believe you'll need to
install the bundle, found here: 

http://search.cpan.org/search?dist=DBD-CSV

I can't give you any real examples as I've not used this module, but here are the
docs.

http://search.cpan.org/doc/JZUCKER/DBD-CSV-0.2001/lib/DBD/CSV.pm

Good luck!

Matt


--- bc <[EMAIL PROTECTED]> wrote:
> i have a mdb db, i use with asp
> 
> i want to switch to php
> 
> i want to use perl to convert the csv produced from this mdb to make a many many
> lined sql statement for my php db, in order to get the 
> data to it
> 
> so in perl, how do i turn each line of csv data into sql statements by adding
> "insert into"... etc etc...
> 
> i want to take 44, jon, doe, 3479, alabama
> 
> and add "insert into TABLENAME id, first, last, number, state VALUES ("
> $the_csv_string_one_per_row ")";
> 
> so in my linux websever's cgi-bin directory, what will the pl script look like:
> 
> ex:
> 
> #!/user/bin/perl
> open (infile, "text.csv");
> @indata = infile;
> foreach???
> 
> something like this?
> 
> thanks a ton, i've gotten a lot of error's trying to do this for days...?
> 
> bc
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to