Sorry for the confusion, it seemed like everyone was close answering but I'm not sure. Currently the data looks like: GSF : "495,916" Electricity RenElec Demand Steam Gas RenGas Oil Coal Chill. Wtr (KWH) (KWH) (KW) (MLB) (Cubic Ft) (Cubic Ft) (Gallon) (Ton) (Ton Hr) Oct Usage "316,800 A" 0 0 0 "375,487 A" 0 0 0 0 Cost "$53,671 A" $0 $0 $0 "$5,799 A" $0 $0 $0 $0 Nov Usage "331,200 A" 0 0 0 "719,832 N" 0 0 0 0 Cost "$35,511 N" $0 $0 $0 "$11,542 N" $0 $0 $0 $0 I currently am lacking a code other than what I would use to rearrange variables and load to MySQL. I want Perl to take the line of Cost which is associated with the Month of Usage above it. Is there any way Perl can read both lines at a time to allow me to play with the variables?

In reply to Reading two lines per loop iteration by fishnflute

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.