my $full_file = ($dir eq '.' ? $file : "$dir/$file");