You stated above that files have anywhere from 3 to 50 fields, but you weren't clear on whether a single file would have the same number of fields in each line...
Therefore, my answer makes the assumption that a file has the same number of fields for each line (though different files may have different numbers of fields). If that is not the case, please ignore the rest of the response.

You can try and split the first 5 lines of a given file on each of the different known deliminators. For each deliminator tested, if the 5 lines you test return the same length array (greater than 1, as that is the default case if there was nothing to split on), then that deliminator is likely to be the correct one.

While this isn't 100% guaranteeed, many of the files should process correctly this way, and then you may only have a few files to work by hand after verifying yourself what the true deliminator is.


In reply to Re: delimited files by etm117
in thread delimited files by saldoman

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.