help putting each page of report in to its own array 
Author Message
 help putting each page of report in to its own array

here's my situation:

I have a multipage report, with each page containing multiple rows and
columns. Each page must be formatted in the same way.

This formatting includes adding spaces, deleting spaces, inserting
text, and newlines, etc...

What I want to do is to put each page into it's own array, so then I
can have my program work with each page separately.

Also there is a 'form feed' character which marks the end of a page.
Which may be helpful.

If anybody could help me out, or point me in the right direction, it
would be greatly appreciated.

Thanks in advance.



Sun, 07 Nov 2004 14:40:51 GMT  
 help putting each page of report in to its own array

Quote:

> here's my situation:

> I have a multipage report, with each page containing multiple rows and
> columns. Each page must be formatted in the same way.

> This formatting includes adding spaces, deleting spaces, inserting
> text, and newlines, etc...

> What I want to do is to put each page into it's own array, so then I
> can have my program work with each page separately.

Do you mean you want an array for each page which contains one element
for each line of that page? Or do you really mean you want an array of
which each element is a page?

If the first is true you should probably use something like an array
of arrays, instead of creating a separate array for each page. For
example:

------
open (IN, 'input_file') or die "Get real: $!";

$/ = "\f";
while (<DATA>) {

Quote:
}

------

In the second case:

------
open (IN, 'input_file') or die "Get real: $!";

$/ = "\f";

------

Cheers,
Bernard
--
echo 42|perl -pe '$#="Just another Perl hacker,"'



Sun, 07 Nov 2004 14:59:00 GMT  
 help putting each page of report in to its own array
Thanks Bernard

That helped a lot.

Mike



Sun, 07 Nov 2004 20:15:47 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. HELP: putting an @array into an %array???

2. Report page-break and page-count

3. Putting/accessing an object from an array - help!

4. Help Putting data from an file that Perl reads into a JavaScript array

5. Need Help with putting Hashes in a two-dimensional array

6. putting arrays in arrays!?!?

7. Bug reporting for manual pages

8. extract colum of data from report which has page headers (how can i)

9. Access 97 report with different second page

10. Page Break in a report

11. Adding report-like header for each printed page

12. Question on LLama book report generation example on Page 28

 

 
Powered by phpBB® Forum Software