On 8/21/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
snip
> It would appear that for all but the first iteration, this is happening.
> However, something during the first time through seems to cause the flag to 
> not
> be what it should.
>
> I've tried changing where the TOP is in the script, when it gets written, the
> value of $- entering the loop... Nothing seems to work.
snip

Did my example code work for you?  You need to set $- to zero after
you are finished writing records for this page.  You should also add
the number of records you have written to  $= (otherwise you will wind
up with headers in the middle of your records if you have more than 60
- your header size).  In general you are reaching the edges of what
format can do and are starting to put in hacks.  This is bad for three
reasons: you need global variables to work with format, you are now
messing with how format works to make it do what you want, and the
whole system is changing in Perl 6, so your code will have to change
anyway.  I would suggest using Perl6::Form* or switching to printf.

* This is an impelentation of Perl 6's version of formats written for Perl 5
http://search.cpan.org/~dconway/Perl6-Form-0.04/Form.pm

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to