chdir $dir; my @csv = <*.csv>; my @txt = <*.txt>;