-my ($ctx,$def,$image,$key,$val)= &{"parseentryin__$kind"}($entry_in, @xa);
+my ($ctx,$def,$image,$key,$val, $width,$icon,$whole,$entry)=
+ &{"parseentryin__$kind"}($entry_in, @xa);
+
+#---------- compute the email to send ----------
+
+my $whoami= `whoami`; $? and die $?;
+chomp $whoami;
+
+my $email= <<END
+To: $whoami
+Subject: pctb $dict $ctx $def [ypp-sc-tools]
+
+Pirate: $pirate
+Caller: $caller
+Dictionary: $dict
+Context: $ctx
+Definition: $def
+
+END
+ ;
+
+if (length $icon) {
+ $email .= "$icon\n\n";
+}
+
+$whole =~ s/(.*)\n/ sprintf "%-${width}s\n", $1 /mge;
+$whole =~ s/^/|/mg;
+$whole =~ s/\n/|\n/mg;
+$whole =~ s/^(.*)/ ",".('_' x $width).".\n".$1 /e;
+$whole =~ s/(.*)$/ $1."\n\`".('~' x $width)."'\n" /e;
+
+my $lw= 79;
+
+while ($whole =~ m/../) {
+ my $lhs= $whole;
+ $lhs =~ s/^(.{0,$lw}).*$/$1/mg;
+ $whole =~ s/^.{1,$lw}//mg;
+#print STDERR "[[[[[$lhs########$whole]]]]]\n";
+ $email .= $lhs;
+}
+
+END
+ ;
+
+my $cutline= "-8<-\n";
+$email .= $cutline.$entry.$cutline;
+
+#---------- prepare the database entry ----------
+
+my $du=$ENV{'YPPSC_DICTUPDATES'};
+chdir $du or die "$du $!"
+ if defined $du;
+