Thanks for your reply below are the two expected output files. The page validation should work for a Account Number as for example in Output 2 for account number 222-222222 there are three pages of statements which collectively needs to be printed and since Output 1 has only 1 page for a unique account so only that data is printed.I have corrected the data as well please have a look now. Thanks for your help
Output 1:
Page 1 of 1 Page 1 of 1 Account Unique_Number Description GENERAL 111-111111 This is the first line I am learning perl
output 2:
Page 1 of 3 Account Unique_Number Description PERSONAL 222-222222 This is the first line I am learning perl Page 2 of 3 Account Unique_Number Description Educational 222-222222 This is the second line I am learning perl Page 3 of 3 Account Unique Number Description Educational 222-222222 This is the third line I am learning perl
Expected Output in File 1:
Page 1 of 1 Account Unique_Number Description GENERAL 111-111111 This is the first line I am learning perl
Expected Output in File 2:
Page 1 of 3 Account Unique_Number Description PERSONAL 222-222222 This is the first line I am learning perl Page 2 of 3 Account Unique_Number Description Educational 222-222222 This is the second line I am learning perl Page 3 of 3 Account Unique Number Description Educational 222-222222 This is the third line I am learning perl

In reply to Re^2: Segregate data based on Page number and account combination by Johndow
in thread Segregation with Perl by Johndow

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.