I have a comma-delimited file of a portfolio management system, i understand that by using a ($var1,$var2) = split(/,/) i can get the fields i need out, the trouble is my while <FILE> handle isnt working. By this i mean ,i cannot get this while loop to loop to the next line. i keep getting the same line being stripped and broken up over and over again. ive tried WHILE $var =~ /\n/ and the \r parameters. but it still wont loop. any ideas guys ? thx (only worked with perl for a month now,logic is fine,syntax is fine,just find one or two things bugging hehe) The file looks like this (01655 etc indicates the start of a new line)
0165593,P,SHF ,AWJ ,001,001,01,METBOX,00000044869,00000311839.55 +,00000006.9500000,25/01/01,ZAR,000000779.60 0165594,P,SHF ,AWJ ,001,001,01,LINCWD,00000023602,00000164033.90 +,00000006.9500000,25/01/01,ZAR,000000410.08

In reply to Stripping a seemingly complicated comma-delimited file by jamesSA

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.