Multiple choice technology programming languages

How to compile a perl program?

  1. perl -c <<programname>>

  2. perl -c

  3. You cannot compile a program

  4. perl -e <<programname>>

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

The -c flag in Perl performs a syntax check (compile) without actually executing the program. This is useful for catching errors before running code. Option B (-c without filename) is incomplete, and option D (-e) executes inline code, not compilation.