in reply to Database Output Comma Delimitted w/quotes

join is a good start, but we'd have to know more about the contents of your hash to answer any better. In general, you should be careful to escape any double-quotes in your data. I'd use something like:

print {$outfile} join ', ', map { qq|"$_"| } map { escape_quotes( $_ ) } @dataRow{qw( field1 field2 field3 field4 field5 ) }; ... sub escape_quotes { my $string = shift; # a negative-lookbehind may be appropriate # to prevent double-escaping $string = s/"/\\"/g; return $string; }