in reply to Security and Style for CSV to mySQL script

I'd prefer to set @question_marks like this:

my @question_marks = ('?') x @columns;
which populates the whole thing at once and eliminates an auxiliary variable.

You should localize $", moving it inside braces close to where it's needed.

else { local $" = ', '; $sth = $dbh->prepare( "INSERT INTO $table (@columns) VALUES (@questio +n_marks)" ); $sth->execute(@csv_values); }
That will prevent surprises in case arrays are stringified elsewhere.

After Compline,
Zaxo