Monks- I have never used perl before, but have a wee bit of experience with awk. My problem is that I have a series of large data matrices, stored as comma-delim ascii files. They are 18 columns by several thousand lines. I'm trying to pull out three of the 18 columns and do some reformatting to get the raw data into a usable for for Arc/Info (GIS program), and I need some advice as to the best way to do this. A snippet of the raw file looks like this:
lon lat segno2 "-69.87" "40.07" "952026060" "-69.85" "40.07" "952026060" "-69.84" "40.07" "952026060" "-65.64" "41.13" "952026064" "-65.66" "41.15" "952026064" "-65.60" "41.32" "952026064" "-65.61" "41.33" "952026064" "-65.57" "41.15" "952026066" "-65.57" "41.13" "952026066" "-65.57" "41.12" "952026066" "-65.56" "41.11" "952026066" "-65.56" "41.10" "952026066" "-65.54" "40.97" "952026066" "-65.54" "40.96" "952026066" "-65.53" "40.95" "952026066" "-65.53" "40.94" "952026066" "-65.47" "41.16" "952026067" "-65.46" "41.15" "952026067"
And I want it to look like this, perferably without the "":
"952026060" "-69.87", "40.07" "-69.85", "40.07" "-69.84", "40.07" end "952026064" "-65.64", "41.13" "-65.66", "41.15" "-65.60", "41.32" "-65.61", "41.33" end "952026066" "-65.57", "41.15" "-65.57", "41.13" "-65.57", "41.12" "-65.56", "41.11" "-65.56", "41.10" "-65.54", "40.97" "-65.54", "40.96" "-65.53", "40.95" "-65.53", "40.94" end "952026067" "-65.47", "41.16" "-65.46", "41.15" end end
Any help/advice as to how to proceed would be much appreciated. Rob

In reply to formatting help by robs

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.