Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: Help with perl program on PS/2 (DOS 3.3) Keywords: STDOUT bug? STDIN bug? DOS sucks? Message-ID: <8978@jpl-devvax.JPL.NASA.GOV> Date: 3 Aug 90 00:42:14 GMT References: <5776@milton.u.washington.edu> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Distribution: na Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 22 In article <5776@milton.u.washington.edu> dittrich@milton.u.washington.edu (Dave Dittrich) writes: : The problem appears as the trailing comment delimiter ("*/") being appended : to the final line of text on the output. : if (m!^/\*! .. m!^\*/!) { # for the lines of : # the comment : s/^\*\*\s*//; # discard leading cruft : $heading = $1 if s/^\.(\w+)\s*//; # possibly switch headings : eval "\$X$heading .= \$_" if $heading; # append to current heading : } # if Your problem is right in there. The final */ line is processed as part of the range, and because $heading is still set to PARAMETER from before, the "*/" gets appended to $XPARAMETER, and the format merrily prints it out. Throw in a s!^\*/!!; and it'll get better. Larry