in reply to Next Line Assigning to A Scalar

Replies are listed 'Best First'.
Re^2: Next Line Assigning to A Scalar
by rmwheeler (Initiate) on Oct 29, 2014 at 20:25 UTC
    I updated the post with the code that I've started out with. I'm just not sure how to go about the rest.
      Ok, so you gave us runnable code and nicely formatted data, but you still didn't show your desired output. I don't understand from your text description what you want.
        toolic thanks for assisting me with this. What I'm trying to do is have the capability of printing just the colors of the car and/or the amount. For example, I just want to be able to print: Car Black Then perhaps I would like to just print: Car 100 I need the color and amount for each line in a variable of some sort so I can reference that variable to update a database field. So I need something like this:
        Variables ========= $type $color $amount -> for 1st line $type $color1 $amount1 -> for 2nd line if $type matches the 1st line $ +type $type $color2 $amount2 - for 3rd line if $type matches the 2nd $type
        Thanks again!