in reply to how to print text + array values at same time

print It expects an array ref as input (not an array!) Try this:
my @DATA = [$ifile, @cols, @matches ]; $csv->print ($fh1, \@DATA);