in reply to Perl array into MySQL Database

I think your current method of joining the array elements into one string and storing the string in a varchar, and then spliting the string to get the elements again is fine - that's how I would do it. I don't know of a better way.

One technical nit-pick comment on your code - the sub "DB_OPEN" doesn't explicitly *return* a value. Instead it depends on Perl's concept of returning the result of the last statement executed in the subroutine. Just my preference, but to me the code is cleaner if you explicitly return what is expected from the subroutine:

sub DB_OPEN { my ($db_name,$host_name,$port,$db_user,$db_pass,) = @_; my $database = "DBI:mysql:$db_name:$host_name:$port"; $dbh = DBI->connect($database,$db_user,$db_pass); return $dbh; # <----------------- :-) } # end-sub
HTH.