Использовать форматер Perl:
#!/usr/bin/perl
open(MYFILE, ">myfile.txt") or die "File does not exist!";
my $id, $workid, $date;
print MYFILE
"+-----+----------+---------------+\n" .
"|ID |WorkId |Date |\n" .
"+-----+----------+---------------+\n";
format MYFILE =
|@<<<<|@<<<<<<<<<|@<<<<<<<<<<<<<<|
$id $workid $date
+-----+----------+---------------+
.
while(<>)
{
next if (m/^ID/);
($id,$workid,$date) = split(/\t/);
write MYFILE;
}