You want to close the directory handle EVAN. Which of the following should you use to accomplish this?
-
close EVAN;
-
closedir EVAN;
-
close_directory EVAN;
-
none of the above
To solve this question, the user needs to know how to close a directory handle in a programming language.
The correct option to close a directory handle in a programming language is closedir EVAN;.
Option A close EVAN; is incorrect because close is used to close a file handle, not a directory handle.
Option C close_directory EVAN; is incorrect because there is no such function or command in most programming languages.
Option D none of the above is incorrect because option B closedir EVAN; is the correct command to close a directory handle in most programming languages.
Therefore, the answer is: B. closedir EVAN;
closedir is the Perl built-in function specifically used to close a directory handle opened with opendir. close is used for filehandles (opened with open), not directory handles, so close EVAN; would not work as intended here. close_directory is not a real Perl function.