Create tab-delimited file of outputs - Perl

Title is very broad, but here's an outline of what I have done so far:

  • I have multiple subdirectories containing multiple *.fna files of DNA sequences
  • I've been able to traverse these subdirectories and create a tab-delimited text file (i.e. the association file) that shows the contents of each folder, as such:

Organism A 1.fna
Organism B 2.fna 3.fna 4.fna
Organism C 5.fna 6.fna

Here is what I would like to accomplish:

  • I would like to loop through every file, perform a task to its contents, and write this data into a different tab-delimited file. I would like to utilize the association file to locate each of the files to perform a task, but I have no clue to how to get started.

Any help is appreciated in advance! Thank you!!!

Open the association file and split each line into an array using 'tab' as the delimiter. Starting with array element @_[2] on each line, open the referenced file and do work, then write the output to a second file.