<?xml version="1.0" encoding="windows-1252"?>
<node id="766789" title="Re: Supressing page breaks in forms" created="2009-05-28 21:56:28" updated="2009-05-28 21:56:28">
<type id="11">
note</type>
<author id="33341">
Albannach</author>
<data>
<field name="doctext">
Have you tried setting &lt;code&gt;$-&lt;/code&gt; (number of lines left on the current page) to a suitably large number after each write instead?
&lt;p&gt;
&lt;b&gt;Update&lt;/b&gt;
Since there seems to be some question as to whether my suggestion would work, I did the following test:
&lt;code&gt;use strict;
use warnings;

$= = 5;

for(1..15) {
  write;
  #$- = 999;
}

format STDOUT =
@### @###### @###
$_, $_**2, $-
.
format STDOUT_TOP =
---TOP---
.
__END__
&lt;/code&gt;

If I run the above, I get the following at the console:&lt;readmore&gt;
&lt;code&gt;---TOP---
   1       1    0
   2       4    3
   3       9    2
   4      16    1
&amp;#9792;---TOP---
   5      25    0
   6      36    3
   7      49    2
   8      64    1
&amp;#9792;---TOP---
   9      81    0
  10     100    3
  11     121    2
  12     144    1
&amp;#9792;---TOP---
  13     169    0
  14     196    3
  15     225    2
&lt;/code&gt;

and if I uncomment the line setting &lt;code&gt;$-&lt;/code&gt; to 999, I get:
&lt;code&gt;---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
&lt;/code&gt;

So I believe resetting &lt;code&gt;$-&lt;/code&gt; should work. It is also noted in [perlfunc] under [write] that setting $- to zero will force a page break, which follows the same pattern.

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-33341"&gt;
&lt;p&gt;--&lt;br&gt;
I'd like to be able to assign to an luser
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
766785</field>
<field name="parent_node">
766785</field>
</data>
</node>
