Let me try to get this even better

I have a process in mind for completing this project. I may be wrong in my interpretation of it (due to my expierence in this language. But none the less the process should be the same).

I have input date like this:
06007190546184070880199116119050311054500 06007190546184075080199236129111399017893 06007190546184107480199126119114399051273 06007190546184109380240356129999399011655 06007190546184115079199116119004322000440 06007190546184115079199136119004311000012

I have 16 different record types (they differ by the first three characters of the data file). Then I use the same code as previously shown to parse and put into files to import into Access to change/modify the data:
elsif ($type eq "060"){ $parsDat[0] = substr($input, 0, 3); #Record type $parsDat[1] = substr($input, 3, 6); #Dist Id $parsDat[2] = substr($input, 9, 9); #id $parsDat[3] = substr($input, 18, 2); #fname $parsDat[4] = substr($input, 20, 3); #mname $parsDat[5] = substr($input, 23, 2); #lname $parsDat[6] = substr($input, 25, 3); #code $parsDat[7] = substr($input, 29, 3); #code $parsDat[8] = substr($input, 32, 1); #code $parsDat[9] = substr($input, 33, 2); #code $parsDat[10] = substr($input, 35, 6); #code $parsDat[11] = substr($input, 41, 39); #code

And...
$output = join(",", @parsDat); print $handle "$output\n";

The result I get is:
060,071905,001206656,80,199,23,612,129,3,99,005168, 060,071905,001366155,80,199,41,611,750,3,99,100471, 060,071905,003326935,80,199,11,612,113,3,23,018042, 060,071905,004506295,79,199,11,611,999,3,23,001000, 060,071905,004506295,80,199,11,611,999,3,23,044175, 060,071905,007507563,80,199,11,611,128,3,11,052500, 060,071905,008364520,79,224,31,611,999,3,23,005000, 060,071905,008364520,80,224,31,611,999,3,23,041820,

So far this part works fine. My next issues are to get these files into Access (for Modifing) and append all the files then remove the delimiters. Each field for all the records are fixed lengths and they should not change by the manipulation being done in Access.

Thanks for the input, I hope this is a better post.

In reply to Re: Removing Delimiters by brkstr
in thread Removing Delimiters by brkstr

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.