eminempark has asked for the wisdom of the Perl Monks concerning the following question:
DC.txtArbeloa 200 Carvajal 190 Ramos 180
DL.txtRamos 200 Pepe 190 Varane 180
formation.txt:Marcelo 200 Coentrao 190 Arbeloa 180
My expected output from my formation.txt will be:DR DC DC DL DR DC DC DL
DR Arbeloa 200 DC Ramos 200 DC Pepe 190 DL Marcelo 200 DR Carvajal 190 DC Varane 180 DC DL Coentrao 190
Any help?the first row: DR. Therefore, it will take the name from DR. txt which + is ARBELOA 200 the second row: DC. Therefore, it will take the name from DC. txt whic +h is RAMOS 200 the third row: DC. Therefore, it will take the name from DC. txt which + is RAMOS 200, BUT since RAMOS is already exist in the line up, it wi +ll be filled by PEPE 190 the fourth row: DL. Therefore, it will take the name from DL. txt whic +h is MARCELO 200 the fifth row: DR. Therefore, it will take the name from DR. txt which + is ARBELOA 200, BUT since ARBELOA is already exist in the line up, i +t will be filled by CARVAJAL 190 the sixth row: DC. Therefore, it will take the name from DC. txt which + is RAMOS 200, BUT since RAMOS and PEPE are already exist in the line + up, it will be filled by VARANE 180 the seventh row: DC. Therefore, it will take the name from DC. txt whi +ch is RAMOS 200, BUT since RAMOS, PEPE and VARANE are already exist i +n the line up, it will be blank the eighth row: DL. Therefore, it will take the name from DL. txt whic +h is MARCELO 200, BUT since MARCELO is already exist in the line up, +it will be filled by COENTRAO 190
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Football formation
by GrandFather (Saint) on Oct 28, 2014 at 03:18 UTC | |
|
Re: Football formation
by crashtest (Curate) on Oct 28, 2014 at 03:50 UTC | |
by eminempark (Initiate) on Oct 28, 2014 at 04:16 UTC | |
|
Re: Football formation
by Loops (Curate) on Oct 28, 2014 at 03:38 UTC | |
by eminempark (Initiate) on Oct 28, 2014 at 04:17 UTC | |
by Loops (Curate) on Oct 28, 2014 at 04:18 UTC | |
by 2teez (Vicar) on Oct 28, 2014 at 05:51 UTC | |
by eminempark (Initiate) on Oct 28, 2014 at 04:45 UTC | |
by 2teez (Vicar) on Oct 28, 2014 at 05:36 UTC | |
| |
by Loops (Curate) on Oct 28, 2014 at 06:47 UTC | |
|