in reply to format file

I'm going to take you at your word, even if it isn't what you meant.

The algorithm is then:

  1. Open the file
  2. Read a line
  3. Split on commas
  4. Push the 3rd field onto an array
  5. Append the second and first fields to a string, space delimited
  6. Go to 2 unless at EOF
  7. Print the unique array values followed by the string

Which bits in particular of this algorithm would you have problems with when converting into real Perl code?

Update: While writing this reply, all content was removed from the OP.

Update 2: Thanks to GrandFather restoring the original content and now with the code tags it's a little clearer what bishop2001 wants. So, here's a slightly revised algorithm:

  1. Open the file
  2. Read a line
  3. Split on commas
  4. Push the 3rd field onto an array
  5. Concatenate the second and first fields into a string, space delimited
  6. Push that string onto the arrayref value of a hash keyed on the 3rd field
  7. Go to 2 unless at EOF
  8. Print the unique array values.
  9. Loop while there are still data items in one of the HoA fields and print the nth entry in each.

The question remains: which bits in particular of this algorithm would you have problems with when converting into real Perl code?