Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^5: sorting and merging in perl

by poj (Abbot)
on Jul 30, 2018 at 16:07 UTC ( [id://1219495]=note: print w/replies, xml ) Need Help??


in reply to Re^4: sorting and merging in perl
in thread sorting and merging in perl

I'm struggling to understand the logic here. In the original post you have records

7900724677,200906871,20180101,20180228
7900724677,200906872,20180301,20180330
7900724677,200906873,20180401,20180420

creating the record

7900724677,200906871:200906873,20180101,20180420

but also you now want these records

7900724655,200906888,20180416,20180522
7900724655,200906889,20180601,20180720
7900724655,200906889,20180724,20180728
7900724655,200906888,20180730,20180830
7900724655,200906890,20180905,20180930
7900724655,200906890,20181005,20181030
7900724655,200906890,20181104,

to create 2 records

7900724655,200906889,20180601,20180728
7900724655,200906890,20180905,

Is that correct ?

poj

Replies are listed 'Best First'.
Re^6: sorting and merging in perl
by Sekhar Reddy (Acolyte) on Aug 08, 2018 at 14:27 UTC

    Thank you Poj,Yes, Your understanding is correct.

      Ok, why are the 200906888 records ignored ? Is it because the following 2 records 200906889 and 3 records 200906890 are not a sequence ?

      poj

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1219495]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-23 18:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found