[comp.lang.perl] Bug with formats on 386i

jsweedle@mipos2.intel.com (Jonathan Sweedler) (11/06/90)

I have the following format in a perl program:

format form_select =
@<) ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$choice, $meaning
~~  ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$meaning
.

When I use this with a string in the variable $meaning that overflows
onto the next line, the second line does not get printed out.  This only
happens on the Sun 386i version of perl that we have here.  When I run
the same program on an ultrix system, everything works fine.  If I pipe
the output of this program through cat then I see the output correctly.

Another interesting quality of our 386i version of perl here is that when
you do "perl -v" part of the version is not printed out.  All that is 
printed out is:
----------------------
$Header: perly.c,v 3.0.1.8 90/10/16 10:14:20 lwall Locked $

Copyright (c) 1989, 1990, Larry Wall

Perl may be copied only under the terms of the GNU General Public License,
----------------------

Again, if I pipe the output of "perl -v" through cat (perl -v | cat) then the
entire message is printed out.  That is:

----------------------
This is perl, version 3.0

$Header: perly.c,v 3.0.1.8 90/10/16 10:14:20 lwall Locked $
Patch level: 36

Copyright (c) 1989, 1990, Larry Wall

Perl may be copied only under the terms of the GNU General Public License,
a copy of which can be found with the Perl 3.0 distribution kit.
----------------------

Again, this only happens on the 386i version we have here and not on our
Ultrix version.  What is going on here?  I assume these two problems are
related.  Anybody else see this stuff before and fixed it?  

Thanks for any help.
===============================================================================
Jonathan Sweedler, Microprocessor Design, Intel Corp.
UUCP: {decwrl,hplabs,oliveb}!intelca!mipos3!mipos2!jsweedle
ARPA: jsweedle%mipos2.intel.com@relay.cs.net

lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) (11/07/90)

In article <825@inews.intel.com> jsweedle@mipos2.intel.com (Jonathan Sweedler) writes:
: ...
: When I use this with a string in the variable $meaning that overflows
: onto the next line, the second line does not get printed out.  This only
: happens on the Sun 386i version of perl that we have here.  When I run
: the same program on an ultrix system, everything works fine.  If I pipe
: the output of this program through cat then I see the output correctly.
: 
: Another interesting quality of our 386i version of perl here is that when
: you do "perl -v" part of the version is not printed out.
: ...
: Again, this only happens on the 386i version we have here and not on our
: Ultrix version.  What is going on here?  I assume these two problems are
: related.  Anybody else see this stuff before and fixed it?  

Yes, they're related, and yes, they've been seen before.  In fact, the
README file just happens to say:

    SUNOS 4.0.[12] needs #define fputs(str,fp) fprintf(fp,"%s",str) in perl.h

It seems that fputs() was busted in that version of the OS, at least in
the presence of line buffering.

Larry