Multiple choice technology programming languages

Forward declaration of subroutine in following way

  1. sub test;

  2. sub test {};

  3. sub test[];

  4. none of the above

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

Forward declarations in Perl use the syntax "sub subroutine_name;" - the semicolon without a body indicates this is a declaration, not a definition. Option B with {} is a full definition with an empty body, and option C with [] is invalid syntax.