Message-ID: <Pine.LNX.4.21.
0105091758220.1160-100000@marmot.rim.canoe.ca>
p4raw-id: //depot/perl@10061
}
$| = 1;
-print "1..19\n";
+print "1..20\n";
my $fh;
my $var = "ok 2\n";
print "# Got [$var], expect [Something else is here]\n";
print "not " unless $var eq "Something else is here";
print "ok 19\n";
+close $fh;
+
+# Check that updates to the scalar from elsewhere do not
+# cause problems
+$var = "line one\nline two\line three\n";
+open $fh, "<", \$var;
+while (<$fh>) {
+ $var = "foo";
+}
+close $fh;
+print "# Got [$var], expect [foo]\n";
+print "not " unless $var eq "foo";
+print "ok 20\n";