# Perl code that can be enhanced? my $column_list=foofile.txt open (my $fh,"<","$column_list") or die "cannot open < $column_list: $!"; my @table_fieldname_array = <$fh>; # see what it looks like print "field array @table_fieldname_array\n"; # do something to the array for example foreach my $attr_name (@table_fieldname_array ) { $field_list .= $attr_name . ","; } print "the result is the array on separate lines with a trailing , ...not useful yet @table_fieldname_array\n";