$ perl -we' open my $fh, ">>", "tabfile.txt" or die $!; my $tab = "\t"; my @files = qw/ a.foo b.foo c.foo /; foreach (@files) { print $fh $tab."- ".$_."\n"; }' $ cat tabfile.txt - a.foo - b.foo - c.foo $ hexdump -c tabfile.txt 0000000 \t - a . f o o \n \t - b . f o 0000010 o \n \t - c . f o o \n 000001b