in reply to CSV file

Unless I misunderstood your question, this should do the trick...
#!/usr/bin/perl use strict; my @arrays = qw( a b c d ); open( my $file, "> /tmp/csv_file" ); print $file join ",\n", @arrays; close( $file );