basicdez has asked for the wisdom of the Perl Monks concerning the following question:
Okay, here is what I am trying to do. I need to read in the data beginning after "TTY" and read this in until the next "TTY" or "EOS", my dilemma is how do I do that?
Please oh please wise monks brothers and sisters, help me if you can...
Here is the file that I am trying to read in...
I am reading in this file as though it were all on one line, but it is not coming from my project that way. Here is the code that I am using..."TTY" "A1" "" "CBI" "*********************************** APPLICANT-C1 ****** +*********************************** EQUIFAX 5.0 for application 4309 *526 EQUIFAX CREDIT INFORMATION SERVICES P O BOX 740241 1150 LAKE HEARN DRIVE STE 460 ATLANTA GA 303740241 + (800) 685-1111 BEACON: 623 00022-ACCOUNT NOT PAID AS AGREED, PUBLIC RECORD, OR COLLECTION AGENC +Y FILLING 00018-NUMBER OF ACCOUNTS CURRENTLY OR IN THE PAST NOT PAID AS AGREED 00010-RLTNSHP OF BALANCE TO HIGH CREDIT ON BANK/NAT OR OTHER REVOLVI +NG/OPEN ACCTS 00013-LENGTH OF TIME (OR UNKNOWN TIME) SINCE ACCT PD AS AGREED OR TR +ADE NARR RPTD D.A.S. SCORE: (CENTRAL MODEL): 704 08023-NUMBER OF ACCOUNTS SHOWING PAYMENT LATE BY 90 DAYS OR MORE / P +UBLIC RECORD ITEMS END OF REPORT EQUIFAX AND AFFILIATES 08/29/01 SAFESCANNED. *********************************** APPLICANT-, FILE-0 *************** +******************** END OF REPORT EQUIFAX AND AFFILIATES 08/29/01 SAFESCANNED. " "TTY" etc....
How can I get this to read the data in and not worry about the data running onto the next line. I want you to know that if I go in the vi editor and delete all the end of line characters (of which I cannot see - they are mysterious), I can get this file read in perfectly. Please help me with this if you have knowledge. I am racking and racking and racking my brain on this one. PS Don't panic on the information in here it is all false...elsif (/"TTY"/) { $TTY_Ind = 1; $toggle = 34, next if /^"TTY"\s*$/; } last if /"EOS"/;
peace, LOVE and ((code))
basicdez
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Help with Reading in of a flat file...
by trs80 (Priest) on Jan 18, 2002 at 04:47 UTC | |
Re: Help with Reading in of a flat file...
by Anonymous Monk on Jan 18, 2002 at 04:59 UTC | |
Re: Help with Reading in of a flat file...
by Ineffectual (Scribe) on Jan 18, 2002 at 04:49 UTC | |
Re: Help with Reading in of a flat file...
by FoxtrotUniform (Prior) on Jan 19, 2002 at 01:24 UTC |
Back to
Seekers of Perl Wisdom