Multiple choice technology programming languages

Which command should be used to close the filehandle KAREN?

  1. close KAREN "sw";

  2. KAREN close;

  3. close KAREN;

  4. close &KAREN

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In Perl, the close function is used to close a filehandle. The syntax is 'close FILEHANDLE;' where FILEHANDLE is the name of the filehandle (without any prefix symbols). The close KAREN; statement properly closes the filehandle named KAREN.