I'm trying to read data records from a telco system. It's a plain text capture, but the records have different lengths.
Depending on the amount of features ('FTR' towards the end in the listing), some records may contain fewer or more lines than this one. Every record starts with 'DES' and ends with a 'DATE' line.
Every record has a unique Terminal Number (TN). I'm just starting with Perl (finally gave up on Procomm), and I'm having trouble figuring out how to read read a single record into a hash. To be honest, I'm not even sure if I should use hash keys or single scalars for each entry.
I appreciate any help
--- Start of listing ---
DES LBALIB
TN 000 0 03 02
TYPE 500
CDEN SD
CUST 0
DN 5028 1 MARP
AST NO
IAPG 0
HUNT 5019
TGAR 1
LDN NO
NCOS 5
SGRP 0
RNPG 32
XLST
SCI 0
CLS CTD DTN FBD XFA WTA THFD FNA HTD ONS
LPR XRA CWD SWD PUA MWD RMMD SMWD LPD XHD SLKD
CCSD LND TVA CFTD SFD C6D CNID CLBD AUTU
ICDD CDMD EHTD MCTD
GPUD DPUD CFXA ARHD OVDD AGTD CLTD LDTD ASCD
MBXD CPFA CPTA DDGA NAMA
MCRD SHL ABDD CFHD
USRD BNRD RTDD RBDD RBHD FAXD PGND FTTU
RCO 0
PLEV 02
AACS NO
FTR CFW 4
FTR PHD
FTR FDN 5019
FTR RDL 16
DATE 14 MAR 2002
--- End of Listing ---
Depending on the amount of features ('FTR' towards the end in the listing), some records may contain fewer or more lines than this one. Every record starts with 'DES' and ends with a 'DATE' line.
Every record has a unique Terminal Number (TN). I'm just starting with Perl (finally gave up on Procomm), and I'm having trouble figuring out how to read read a single record into a hash. To be honest, I'm not even sure if I should use hash keys or single scalars for each entry.
I appreciate any help
--- Start of listing ---
DES LBALIB
TN 000 0 03 02
TYPE 500
CDEN SD
CUST 0
DN 5028 1 MARP
AST NO
IAPG 0
HUNT 5019
TGAR 1
LDN NO
NCOS 5
SGRP 0
RNPG 32
XLST
SCI 0
CLS CTD DTN FBD XFA WTA THFD FNA HTD ONS
LPR XRA CWD SWD PUA MWD RMMD SMWD LPD XHD SLKD
CCSD LND TVA CFTD SFD C6D CNID CLBD AUTU
ICDD CDMD EHTD MCTD
GPUD DPUD CFXA ARHD OVDD AGTD CLTD LDTD ASCD
MBXD CPFA CPTA DDGA NAMA
MCRD SHL ABDD CFHD
USRD BNRD RTDD RBDD RBHD FAXD PGND FTTU
RCO 0
PLEV 02
AACS NO
FTR CFW 4
FTR PHD
FTR FDN 5019
FTR RDL 16
DATE 14 MAR 2002
--- End of Listing ---