Chris Charley
User
Oct 20, 2013, 11:46 AM
Post #14 of 15
(2934 views)

Re: [raghupise] Pattern seacrh in Perl and redirecting to other file
[In reply to]

Can't Post


Just parsing the 'list' names and the 'group' names gave me the output (below). There were only 22 list names but there were 184 group names (all beginning with X, I just stripped out the 'X'). Do you only want to print out the group names where there is a matching list name (and associated data, mapsets and transactions). The file is irregular. mapsets and transactions are separated by a blank line at times and other times are not separated by a blank line. It is difficult to design a program to handle these irregular cases.
C:\Old_Data\perlp>perl t33.pl csd.txt list count: 22 group count: 184 $VAR1 = { 'CT08LIST' => 2, 'CT09LIST' => 2, 'DB16LIST' => 1, 'DB17LIST' => 1, 'DFH$IVPL' => 1, 'DFHLIST' => 1, 'FALCLIST' => 1, 'FALCLST1' => 1, 'PAAXLIST' => 1, 'PAA1LIST' => 1, 'PAA2LIST' => 1, 'PAA3LIST' => 1, 'PAC1LIST' => 1, 'PAC2LIST' => 1, 'PAC3LIST' => 1, 'PAC4LIST' => 1, 'PA01LIST' => 1, 'PA02LIST' => 1, 'PA03LIST' => 1, 'PA04LIST' => 1, 'PA05LIST' => 1, 'PA06LIST' => 1 }; $VAR2 = { 'CT09L1' => 2, 'CT09L2' => 1, 'CT09R1' => 1, 'DB16L1' => 1, 'DB17L1' => 1, 'DB17L2' => 1, 'DB17R1' => 1, 'HOMEL1' => 1, 'IVRL1' => 1, 'NDSCTG' => 1, 'NDSJTRN' => 1, 'NDSPRI2' => 1, 'PA0XL1' => 1, 'PA01L1' => 1, 'PA02L1' => 1, 'PA03L1' => 1, 'PA45L1' => 1, 'PA60L1' => 1, 'PA81L1' => 1, 'PA81R1' => 1, 'PA82L1' => 1, 'PA83L1' => 1, 'PA83R1' => 1, 'PA88L1' => 1, 'PCAUOPS' => 1, 'PCCCL1' => 1, 'PCCCR1' => 1, 'PCCEL1' => 1, 'PCCLL1' => 1, 'PCCML1' => 1, 'CT08L1' => 1, 'PCCPL1' => 1, 'PCCPR1' => 1, 'PCCTL1' => 1, 'PCCTR1' => 1, 'PCCVL1' => 1, 'PCCVR1' => 1, 'PCPHBCK' => 1, 'PCPHL1' => 1, 'PCPHL2' => 1, 'PCPHR1' => 1, 'PCPSL1' => 1, 'PCPSR1' => 1, 'PCVTL1' => 1, 'PDPHBCK' => 1, 'PDPHL1' => 1, 'PDPHL2' => 1, 'PDPHR1' => 1, 'PDVTL1' => 1, 'PM0XL1' => 1, 'PM01R1' => 1, 'PM02R1' => 1, 'PM03R1' => 1, 'PM04R1' => 1, 'PM81L1' => 1, 'PM82L1' => 1, 'PM83L1' => 1, 'PRAUOPS' => 1, 'PRA1L1' => 1, 'PRA1L2' => 1, 'PRA1L3' => 1, 'PRA1L4' => 1, 'PRCL1' => 1, 'PRC1L1' => 1, 'PRC1L2' => 1, 'PRC1L3' => 1, 'PRC1L4' => 1, 'PRC1L5' => 1, 'PRC1L6' => 1, 'PRIBL2' => 1, 'PRIBR1' => 1, 'PRIPL1' => 1, 'PRIVL1' => 1, 'PRI1L1' => 1, 'PRI1L2' => 1, 'PRI1L3' => 1, 'PRI1L4' => 1, 'PRI1L5' => 1, 'PRI1L6' => 1, 'PRI1L7' => 1, 'PRI2L1' => 1, 'PRI2L2' => 1, 'PRI2L3' => 1, 'PRI2L4' => 1, 'PRI2L5' => 1, 'PRI2L6' => 1, 'PRI2L7' => 1, 'PRI2L8' => 1, 'PRMRL1' => 1, 'PRM1L1' => 1, 'PRM4L1' => 1, 'PRM5L1' => 1, 'PRM7L1' => 1, 'PRM9L1' => 1, 'PRNABCK' => 1, 'PRNAL1' => 1, 'PRNAL2' => 1, 'PRNAR1' => 1, 'PRPOL1' => 1, 'PRT1L1' => 1, 'PRT1R1' => 1, 'PRT1R2' => 1, 'PRT1R3' => 1, 'PRT1R4' => 1, 'PRT1R6' => 1, 'PRT2L1' => 1, 'PRT2R1' => 1, 'PRT2R2' => 1, 'PRT2R3' => 1, 'PRT2R4' => 1, 'PRT2R6' => 1, 'PRVFL1' => 1, 'PRVTL1' => 1, 'PRVTL2' => 1, 'PRZFL1' => 1, 'PRZFL10' => 1, 'PRZFL2' => 1, 'PRZFL3' => 1, 'PRZFL4' => 1, 'PRZFL5' => 1, 'PRZFL6' => 1, 'PRZFL7' => 1, 'PRZFL8' => 1, 'PRZFL9' => 1, 'PSCAL1' => 1, 'PSCBL1' => 1, 'PSCCL1' => 1, 'PSCCL2' => 1, 'PSCCL3' => 1, 'PSC1L1' => 1, 'PSC2L1' => 1, 'PSC2L2' => 1, 'PSC3R1' => 1, 'PSC4L1' => 1, 'PSC4R1' => 1, 'PSC5L1' => 1, 'PSEDL1' => 1, 'PSF0L1' => 1, 'PSF0R1' => 1, 'PSPBL1' => 1, 'PSTRL1' => 1, 'PS01L1' => 1, 'PS01R1' => 1, 'PS02LJP' => 1, 'PS02L1' => 1, 'PS02R1' => 1, 'PS03L1' => 1, 'PS03R1' => 1, 'PS04L1' => 1, 'PS04R1' => 1, 'PT81L1' => 1, 'PT81R1' => 1, 'PT82L1' => 1, 'PT82R1' => 1, 'PT82R2' => 1, 'PT82R3' => 1, 'PT82R4' => 1, 'PT82R5' => 1, 'PT82R6' => 1, 'PT82R7' => 1, 'PT82R8' => 1, 'PT83L1' => 1, 'PT84R1' => 1, 'RCCL1' => 1, 'RC28L1' => 1, 'RC32L1' => 1, 'RC32L2' => 1, 'RC34L1' => 1, 'RC34L3' => 1, 'RC34L4' => 1, 'RC34R1' => 1, 'RC35L1' => 1, 'RC37BCK' => 1, 'RC37L1' => 1, 'RC37R1' => 1, 'RMSL1' => 1, 'RMSTL1' => 1, 'SECL1' => 1, 'TCPIPL1' => 1, 'TSG' => 1, 'TSS01' => 1, 'VAXL1' => 1, 'VBANKL1' => 1, 'VBNKL1' => 1 };
