Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
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


In reply to Re: Supressing page breaks in forms by Albannach
in thread Supressing page breaks in format/write output by yaconsult

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (10)
    As of 2014-09-18 20:53 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (124 votes), past polls