Multiple choice technology programming languages

open (INPUT,"){ print $_; } How many times will the file get printed?

  1. once

  2. twice

  3. the program will go on into infinite loop

  4. None of the above

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

The Perl code reads inpput.txt line-by-line using a while loop. The entire content of the file is printed line-by-line, meaning the file's contents are printed exactly once. Other options like printing twice or entering an infinite loop are incorrect because the loop terminates once the end of the file is reached.