exec 'gunzip'; die $!;
}
+my $dedupedtsv= pipethrough_prep();
+
while (<GZ>) {
- check_tsv_line($_,\&fail);
+ my @v= check_tsv_line($_,\&fail);
+ print $dedupedtsv join('\t',@v),"\n" or die $!;
}
+
GZ->error and die $!;
$?=0; close GZ; $? and fail("gunzip for check failed code $?");
+my $launderedgz= pipethrough_run($dedupedtsv,undef,'gzip','gzip');
+
my $mdatafile= MIME::Entity->build(Top => 0,
Type => 'application/octet-stream',
Disposition => 'attachment',
Encoding => 'base64',
Filename => 'deduped.tsv.gz',
- Path => $datafile);
+ Data => $launderedgz);
$mcontent->add_part($mdatafile);
open M, "|/usr/sbin/sendmail -t -oi -oee -odb"