in reply to load_file and mysql

You know, of course, that the LOAD_FILE function only works if the file is in the server's host. If the file is not in the same host, then you should read the file with your script and insert all the values with a query.
# untested my $query = qq{ INSERT INTO search VALUES (? ?)}; my $sth = $dbh->prepare($query); # get the list of filenames into an array, or just loop # though them as you wish. This is just an example for my $filename (@files) { local $/ = undef; # will read the file at once open FILE, "< $filename"; my $text = <FILE>; close FILE; $sth->execute( $filename, $text); }
This example will only work if the size of your file is less than max_allowed_packet. I have a similar routine in my database and I have had no problems inserting big fields. The maximum allowed is 16 MB, but I never needed anything more than 3 MB.
_ _ _ _ (_|| | |(_|>< _|