in reply to Help with CSV file parsing
Of course, this doesn't take into account the manipulation on the second field of your csv that it sounds like you need to do.# Code that connects to database my $sth = $dbh->prepare(' Insert into person_info VALUES(?,?,?)'); # Code that opens your file. while (<FILE>) { my @row = split /,/; $sth->bind_param(1, $row[0]); $sth->bind_param(2, $row[1]); $sth->bind_param(3, $row[2]); $sth->execute() or warn "Couldn't execute INSERT: $DBI::errstr\n"; }
Hope that helps,
--starX
www.axisoftime.com
|
---|