Chas Owens wrote:
> 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
> 

Chas,

Yes, the test code worked.  I've installed Perl6::Form and will see what I can
do with it.  As it seems to be more robust, I might even be able to format the
output the way I had mentioned in a previous post:

Ticket ID             Subject            Date  hh:mm
--------------------------------------------------------
    12345  Ticket Subject          MM/DD/YYYY   1:00
                                   MM/DD/YYYY   2:00
                                   MM/DD/YYYY   3:00


Mathew
-- 
Keep up with me and what I'm up to: http://theillien.blogspot.com

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


Reply via email to