RandomWalk has asked for the wisdom of the Perl Monks concerning the following question:
I'm supposed to get $right, and here is what I get:format OUT = the quick brown @<< $fox jumped @* $multiline ^<<<<<<<<< $foo ^<<<<<<<<< $foo ^<<<<<<... $foo now @<<the@>>>> for all@|||||men to come @<<<< { 'i' . 's', "time\n", $good, 'to' } . open(OUT, '>Op_write.tmp') || die "Can't create Op_write.tmp"; END { 1 while unlink 'Op_write.tmp' }$good = 'good'; $multiline = "forescore\nand\nseven years\n"; $foo = 'when in the course of human events it becomes necessary'; write(OUT); close OUT or die "Could not close: $!"; $right = "the quick brown fox jumped forescore and seven years when in the course of huma... now is the time for all good men to come to\n"; if (cat('Op_write.tmp') eq $right) { print "ok 1\n"; 1 while unlink 'Op_write.tmp'; } else { print "not ok 1\n"; }
the quick brown fox jumped forescore and seven years when in the course of huma... now is thetime for all good men to come toThe space that was to preceed time now follows it. I don't understand what happened to the newline, but it does appear that the output I got did mess up the padding. What do you think?
20040810 Edit by ysth: change title from: make test failure
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl-5.8.5 op/write.t fails
by Prior Nacre V (Hermit) on Aug 06, 2004 at 21:46 UTC | |
by RandomWalk (Beadle) on Aug 06, 2004 at 22:21 UTC | |
by Prior Nacre V (Hermit) on Aug 06, 2004 at 23:00 UTC |