Have you tried setting
$- (number of lines left on the current page) to a suitably large number after each write instead?
Update
Since there seems to be some question as to whether my suggestion would work, I did the following test:
use strict;
use warnings;
$= = 5;
for(1..15) {
write;
#$- = 999;
}
format STDOUT =
@### @###### @###
$_, $_**2, $-
.
format STDOUT_TOP =
---TOP---
.
__END__
If I run the above, I get the following at the console:
---TOP---
1 1 0
2 4 3
3 9 2
4 16 1
♀---TOP---
5 25 0
6 36 3
7 49 2
8 64 1
♀---TOP---
9 81 0
10 100 3
11 121 2
12 144 1
♀---TOP---
13 169 0
14 196 3
15 225 2
and if I uncomment the line setting
$- to 999, I get:
---TOP---
1 1 0
2 4 999
3 9 999
4 16 999
5 25 999
6 36 999
7 49 999
8 64 999
9 81 999
10 100 999
11 121 999
12 144 999
13 169 999
14 196 999
15 225 999
So I believe resetting
$- should work. It is also noted in
perlfunc under
write that setting $- to zero will force a page break, which follows the same pattern.
--
I'd like to be able to assign to an luser