$str = "ha" x 5; print $str;
-
hahahahaha
-
Compilation error
-
haX5
-
nothing
A
Correct answer
Explanation
In Perl, the x operator repeats a string. The expression "ha" x 5 creates "hahahahaha" by repeating "ha" five times. This is a valid Perl string operation. Option B is incorrect because this is valid syntax, option C would require concatenation or different syntax, and option D is wrong because x is the repetition operator not a multiplication symbol.