#!/usr/bin/perl use strict; use warnings; my $dir_path="Your Directory Path"; opendir (DIR, $tmp_dir) or die $!;