You can read a file in fixed-length chunks by setting $/ to a reference to an integer
{
use bytes;
local $/ = \1048576;
open my $fh, '<', 'bigfile.bin' or die $!;
while (<$fh>) {
# stuff the db
}
}
To reconstruct your file you can either concatenate the blobs in memory, or write them to a file. In either case you need a way to retain their order, which the db can do if you make a column to remember it by. To check that things go ok, all you really need is to set RaiseError in the DBI handle.
After Compline,
Zaxo