in reply to Adding columns in a loop to an existing file using Perl

I might help if you provided something like this

<p> Example input, file1 <c> a b c </c> <p> example input, file2 <c> 6 7 8 </c> <p> This is the output I want, file out <c> a c 7 </c>

But no matter, here is the answer

Use Text::CSV or Text::xSV

Examples at

 [CSV hash ] CSV hash
Best way to match a hash with large CSV file
perl hash to CSV using Text::CSV_XS
Issue parsing CSV into hashes?
Veriable Length Array/Hash derived from CSV to populate an XML
extracting data from CSV files and making hash of hashes
Re^2: build hash from csv file
Encoding a hash in perl before saving it as a CSV file
hash from CSV-like structure
Read the csv file to a hash....
Parsing CSV into a hash
build hash from csv file
Converting a CSV list to a list of hashrefs naming the fields

Converting File Delimiters (csv to tsv to psv, use App::CCSV)