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...

"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....
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...
elsif (/"TTY"/) { $TTY_Ind = 1; $toggle = 34, next if /^"TTY"\s*$/; } last if /"EOS"/;
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...

peace, LOVE and ((code))

basicdez

In reply to Help with Reading in of a flat file... by basicdez

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.