in reply to Perl solution for storage of large number of small files
Be very wary of the DB hammer wielders treating your problem as a nail. In most cases, RDBMSs have fairly small limits on the size (eg.8kb) of individual tuples that can be stored in-line. When they exceed this size, they are moved into out-of-line storage with a pointer substituted into the main table.
Out-of-line storage often as not translates into "the file system" in some fashion or other. Given the size of your entities, it means that putting them into an RDBMS will essentially just add the overhead of the RDBMS to your accesses and you will still carry the overhead of the filesystem. The big difference is that you will not have any control over where and how your data is stored within the filesystem and so will lose the opportunities for optimisations based upon your knowledge of that data and it's location.
For a little more on this see the description of PostGreSQL's TOAST.