#!/usr/bin/perl use strict; use warnings; my $dir_path="\Incoming\Temp"; opendir (Incoming\Temp, $tmp_dir) or die $!; open (MYFILE, '>>vehicles.txt'); while (my $file_name = readdir(Incoming\Temp)) {print "$file_name\n";} print MYFILE $file_content; close (MYFILE); CLOSEDIR;