I'm having trouble parsing a certain section from a text file. This section of the text file is below:
---S&E
O1 RRM/LCC U34/MSS *MSAAM
MSSGRP.WCOMMWI/LPIC MCI
/LPCX 0222/LPCA SN, 01-27-03
/PIC MCI/PICX 0222/PCA SN,
01-27-03
O1 AYW
O1 ESC
O1 ESL
O1 ESX
O1 CFZ/RCYC 4/CFND 1 866
862-3526
O1 GCZ/CFNB 1 866 862-3526
PG 01
D1DN0030U 02L (FP ZAA 01056 071503 0054 00488 071103 2042)
O1 N7PXA
O1 UYP
O1 U21
O1 U9SAT
O1 POR1X
O1 NPU
What I need to do is grab the first letter, the second number, the first 3-5 letters before the / and then identify 2 pieces of data between each / /. My output file would look like this, delimited by a |.
O|1|RRM|LCC|U34
O|1|RRM|MSS|*MSAAMMSSGRP.WCOMMWI
What I'm having trouble with is how the line breaks into the next page. Right now my perl parser reads each line <> and tries to identify all the variables. I can't seem to get my output to include all the data between the / / delimeters in my input file. If anyone has any ideas that would be greatly appreciated.
Thanks!
---S&E
O1 RRM/LCC U34/MSS *MSAAM
MSSGRP.WCOMMWI/LPIC MCI
/LPCX 0222/LPCA SN, 01-27-03
/PIC MCI/PICX 0222/PCA SN,
01-27-03
O1 AYW
O1 ESC
O1 ESL
O1 ESX
O1 CFZ/RCYC 4/CFND 1 866
862-3526
O1 GCZ/CFNB 1 866 862-3526
PG 01
D1DN0030U 02L (FP ZAA 01056 071503 0054 00488 071103 2042)
O1 N7PXA
O1 UYP
O1 U21
O1 U9SAT
O1 POR1X
O1 NPU
What I need to do is grab the first letter, the second number, the first 3-5 letters before the / and then identify 2 pieces of data between each / /. My output file would look like this, delimited by a |.
O|1|RRM|LCC|U34
O|1|RRM|MSS|*MSAAMMSSGRP.WCOMMWI
What I'm having trouble with is how the line breaks into the next page. Right now my perl parser reads each line <> and tries to identify all the variables. I can't seem to get my output to include all the data between the / / delimeters in my input file. If anyone has any ideas that would be greatly appreciated.
Thanks!