Is this what you're aiming for?

C:\test>junk4 junk 25.82, -80.28, 1012, 4, 29.8, 23.8, 100, 10 25.82, -80.28, 1000, 113, 28.8, 23.8, 95, 12 25.82, -80.28, 961, 466, 25.4, 22.3, 93, 15 25.82, -80.28, 925, 802, 23.2, 19.4, 95, 15 25.82, -80.28, 850, 1536, 19.0, 14.0, 95, 14 25.82, -80.28, 769, 2390, 14.2, 8.2, 96, 11 25.82, -80.28, 753, 2568, 12.4, 10.5, 97, 11 25.82, -80.28, 737, 2748, 11.8, 6.8, 100, 11 25.82, -80.28, 700, 3178, 9.4, 4.4, 110, 11

#!/usr/bin/perl -w use strict; my $header = do{ local $/ = "\n-"; <DATA> }; my( $lat, $lon ) = $header =~ m[ Latitude: \s+ ( \S+ ) \s+ Longitude: \s+ ( \S+ ) \s+ ]smx; my $discard = map{ scalar <DATA> } 1 .. 4; while( my $line = <DATA> ) { my( $pres, $hght, $temp, $dewp, $dir, $spd ) = ( split (' ', $line), 10 )[ 1, 2, 3, 4, 8, 9 ]; print "$lat, $lon, $pres, $hght, $temp, $dewp, $dir, $spd\n"; } __DATA__ <TITLE>Plymouth State RAOB Thermodynamic Diagram/Data</TITLE> </center><pre> Miami Intl Airp FL US KMIA 1 25.82 -80.28 4 72202 Date: 0000Z 24 AUG 05 Station: KMIA WMO ident: 72202 Latitude: 25.82 Longitude: -80.28 Elevation: 4.00 ---------------------------------------------------------------------- +--------- LEV PRES HGHT TEMP DEWP RH DD WETB DIR SPD THETA THE-V THE-W TH +E-E W mb m C C % C C deg knt K K K K + g/kg ---------------------------------------------------------------------- +--------- SFC 1012 4 29.8 23.8 70 6.0 25.3 100 10 301.9 305.3 298.1 35 +7.0 18.65 1 1000 113 28.8 23.8 74 5.0 25.1 95 12 302.0 305.4 298.2 35 +7.7 18.88 2 961 466 25.4 22.3 83 3.1 23.2 93 15 302.0 305.3 297.7 35 +4.9 17.91 3 925 802 23.2 19.4 79 3.8 20.5 95 15 303.0 305.9 296.4 34 +9.0 15.51 4 850 1536 19.0 14.0 73 5.0 15.7 95 14 306.0 308.3 294.7 34 +1.8 11.91 5 769 2390 14.2 8.2 67 6.0 10.5 96 11 309.8 311.4 293.6 33 +7.0 8.91 6 753 2568 12.4 10.5 88 1.9 11.2 97 11 309.7 311.7 294.8 34 +2.2 10.65 7 737 2748 11.8 6.8 71 5.0 8.8 100 11 310.9 312.5 293.6 33 +6.9 8.44 8 700 3178 9.4 4.4 71 5.0 6.5 110 11 312.9 314.3 293.4 33 +6.3 7.51

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re: PARSER help by BrowserUk
in thread PARSER help by MKevin

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.