Programming Languages C# Subjective
Mar 15, 2013

How do I do fill_in_the_blank for each file in a directory?

Detailed Explanation

Here's code that just prints a listing of every file in the current directory:
#!/usr/bin/perl -w
opendir(DIR, ".");
@files = readdir(DIR);
closedir(DIR);
foreach $file (@files) {
print "$file\n";
}

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback