open(HANDLE, $file) or die $!; my $bin_data; $bin_data .= for ; ...INSERT INTO fotos (bin_data, name) VALUES ($bin_data, $name)