my $sth = $dbp->prepare("SELECT pdf_report FROM report_table WHERE report_name = ($report_name_here)"); $sth->{syb_binary_images} = 1; $sth->{syb_no_bind_blob} = 1; $sth->execute(); while (my @row = $sth->fetchrow_array) { my $image = $sth->syb_ct_get_data(1, \$pdf_report, 0); #This just prints out the size of the file, how can I actually retrieve the file and write it to disk? print "$image\n"; }