Hello, I want to collect certain data from the following text:

KATL GFS MOS GUIDANCE 2/01/2010 1800 UTC
DT /FEB 2 /FEB 3 /FEB 4
HR 00 03 06 09 12 15 18 21 00 03 06 09 12 15 18 21 00 03 06 12 18
N/X 38 47 32 55 38
TMP 47 44 41 40 39 40 42 45 43 41 37 35 33 41 50 55 50 45 42 40 45
DPT 34 33 31 32 34 36 38 38 36 34 32 30 29 29 29 28 29 30 30 32 34
CLD SC OV OV OV OV OV FW CL BK SC FW CL CL FW FW SC CL OV OV BK OV
WDR 09 08 07 04 02 03 32 32 33 32 32 32 32 34 01 04 02 04 05 07 07
WSP 07 07 07 09 10 08 09 11 09 08 08 08 08 08 07 06 07 06 06 07 11
P06 79 99 30 1 1 3 2 2 5 28 48
P12 99 30 3 2 29
Q06 2 4 0 0 0 0 0 0 0 0 2
Q12 3 0 0 0 0
T06 2/13 2/ 1 2/ 4 0/ 8 0/12 0/ 0 0/ 5 0/11 0/ 2 3/ 5
T12 5/ 4 0/12 0/ 5 0/11 3/ 5
POZ 0 0 3 1 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0
POS 0 0 0 0 0 0 0 0 0 2 8 13 11 0 1 0 0 0 0 1 0
TYP R R R R R R R R R R R R R R R R R R R R R
SNW 0 0
CIG 8 6 5 4 3 4 4 4 6 8 8 8 8 8 8 8 8 8 8 6 4
VIS 7 7 5 5 5 5 7 7 7 7 7 7 7 7 7 7 7 7 7 7 4
OBV N N BR BR N BR N N N N N N N N N N N N N N BR

To start, I want to assign each of the (\d\d) values after "TMP" to a variable. I've tried my @temps = ($display =~ /\s+TMP\s+((\d\d)\s)+/s);, but this isn't working. Any suggestions?


Thanks!

In reply to Regex help by cheech

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.