#!/usr/bin/perl use strict; use warnings; my $directory = '/sentence'; opendir (DIR, $directory) or die $!; while (my $file = readdir(DIR)) { #Run your script here with ``(backtick) or system() } closedir(DIR);