Hello Monks,

GoodEvening

Can any one help me on this, How this can be done in perl

Thank you very much in advance

I have 4 different Scenarios, I have listed down, and i have also written how my hash should store

STRUCTURE OF MY DATA below(with Header, last two fields are date fields in yyyymmdd format):

A1,B1,ACTDATE,DEACTDATE

7900724666,200906888,20180406,20180411

7900724666,200906888,20180416,20180522

7900724666,200906888,20180601,20180720

For the above content(A1), i want to store in hash like this==>A1,B1 of MIN ACTDATE:B1 of MAX DEACTDATE,MIN ACTDATE,MAX DEACTDATE

For the above example, ==>7900724666,200906888:200906888,20180406,20180720

7900724677,200906871,20180101,20180228

7900724677,200906872,20180301,20180330

7900724677,200906873,20180401,20180420

For the above content(A1), i want to store in hash like this==>7900724677,200906871:200906873,20180101,20180420

7900724688,200906881,20180101,20180228

7900724688,200906881,20180303,20180330

7900724688,200906882,20180404,20180430

7900724688,200906883,20180508,20180620

For the above content(A1), i want to store in hash like this==>7900724688,200906881:200906883,20180101,20180620

7900724699,200906891,20180101,20180228

7900724699,200906891,20180303,20180330

7900724699,200906892,20180404,20180430

7900724699,200906893,20180508,

For the above content(A1), i want to store in hash like this==>7900724699,200906891:NULL,20180101,NULL


In reply to sorting and merging in perl by Sekhar Reddy

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.