Yes, I did test it. I see now how my test was flawed. Thanks.
This is another alternative, but I agree that I don't see what the advantage of this is over printf:
binmode STDOUT;
while( ... ) {
my( $name, $home )= ...;
formline "@<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<\r", $name, $hom
+e;
print $^A, $/; $^A= "";
}
This also suggested another "solution" that works but is quite undesirable due to it being fragile: Just include an extra literal carriage return on the end of each of the format's "picture" line(s) in the script's source code.
|