Message-ID: <Pine.LNX.4.21.
0105011431300.1526-100000@marmot.rim.canoe.ca>
p4raw-id: //depot/perl@9931
dTHX;
PerlIOScalar *s = PerlIOSelf(f,PerlIOScalar);
char *dst = SvGROW(s->var,s->posn+count);
- Move(vbuf,dst,count,char);
+ Move(vbuf,dst+s->posn,count,char);
s->posn += count;
SvCUR_set(s->var,s->posn);
SvPOK_on(s->var);
}
$| = 1;
-print "1..9\n";
+print "1..10\n";
my $fh;
my $var = "ok 2\n";
print "ok 8\n";
print "not " unless <$fh> eq "foo\n";
print "ok 9\n";
-
+# Test multiple consecutive writes to $var
+$var = "";
+seek($fh, 0, 0);
+print $fh "Fred and Wilma ";
+print $fh "Flintstone";
+print "not " unless $var eq "Fred and Wilma Flintstone";
+print "ok 10\n";