in reply to How to read files in a directory, directory path to be given through CMD

print "enter path\n"; $path = <>; chomp($path); opendir (DIR, $path) or die $!; while (my $file = readdir(DIR)) { if(-f $file) { print "this is a file--->".$file."\n"; } } closedir(DIR);
  • Comment on Re: How to read files in a directory, directory path to be given through CMD
  • Download Code