Super Search is your best friend, second only to Google.
http://www.perlmonks.org/?node_id=150255
There are two important considerations here:
-
In my experience, putting the actual data in a database is sometimes much less satisfactory than putting the data in a disk-file at a known location, and putting a reference to that data in the database.
-
If you do move a large binary object into a database field, it is important that you do so in a way that does not require an inordinate amount of memory consumption ... at least, not within/by the web server. You may also find that you can’t afford to take the time. You may have to arrange for the actual transfer to be done by a separate process that exists only for this purpose – apart from both the web-server and the database-server processes.