+
+my $guts = open_new('pod/perldebguts.pod', '>');
+
+my $code;
+my $name_fmt = '<' x ($longest_name_length-1);
+my $descr_fmt = '<' x (58-$longest_name_length);
+eval <<EOD;
+format GuTS =
+ ^*~~
+ \$cmnt[\$_]
+ ^$name_fmt ^<<<<<<<<< ^$descr_fmt~~
+ \$name[\$_], \$code, \$rest[\$_]
+.
+EOD
+
+select +(select($guts), do {
+ $~ = "GuTS";
+
+ open my $oldguts, "pod/perldebguts.pod"
+ or die "$0 cannot open pod/perldebguts.pod for reading: $!";
+ while(<$oldguts>) {
+ print;
+ last if /=for regcomp.pl begin/;
+ }
+
+ print <<'end';
+
+ # TYPE arg-description [num-args] [longjump-len] DESCRIPTION
+end
+ for (0..$lastregop-1) {
+ $code = "$code[$_] ".($args[$_]||"");
+ $code .= " $longj[$_]" if $longj[$_];
+ if ($cmnt[$_] ||= "") {
+ # Trim multiple blanks
+ $cmnt[$_] =~ s/^\n\n+/\n/; $cmnt[$_] =~ s/\n\n+$/\n\n/
+ }
+ write;
+ }
+ print "\n";
+
+ while(<$oldguts>) {
+ last if /=for regcomp.pl end/;
+ }
+ do { print } while <$oldguts>;
+
+})[0];
+
+close_and_rename($guts);