I have an output file that is \t delimited:
Data for 08/10/2011
Host QueueName Queue-id
test 123 Test Q 110
test 456 Test Q 120
test 789 Test Q 130
I’m looking to remove the first line (date) and then I want the 2nd line (header columns) to
print out with the values like so as my final output file:
Host=test QueueName=123 Test Q Queue-id=110
Host=test QueueName=456 Test Q Queue-id=120
Host=test QueueName=789 Test Q Queue-id=130
What is a good way/practice to do this in perl?
I would recommend Text::CSV_XS for reading the file.
In this recent question, there was a similar problem: How can I use Perl extract a particular column from a tab-separated file? (See my answer)