BreakInterview

1. To interpolate variable values inside a string, do not

use single quotes to enclose a string
use double quotes to enclose a string
use string concatenation
use scalar variables for interpolation

2. Value of $expr = 1 + 2 * 3 – 4 is

5
-3
3
None

3. If $a = “Ape” and $b = 3 the result of $a x $b is

error
Ape3
ApeApeApe
3Ape

4. The statement $myvar = <STDIN>

Stores the string “STDIN” in $myvar
Reads a line and saves in $myvar
Stores the string “” in $myvar
Returns an error that double quotes are missing

5. A scalar variable can hold

256 characters
1024 characters
32768 characters
Depends on system specifications

6. Next and Last statements are used to

Exit conditional blocks
Exit functions
Exit loops
Exit script execution

7. When $a = 1 and $b = 2, all of the following statements evaluate to true except,

$a == 1 and $b == 2
$a == 2 or $b == 2
($a == 2 and $b == 1) or $b == 2
$a === 1 or $b ==1

8. The statement open(file_handle, “file.txt”)

opens a file for reading alone
opens a file for reading and writing
opens a file for overwriting
opens a file for appending

9. Which of the following is used to create a reference to a variable?

/
\
_
&

10. Anonymous hashes can be made by using

[]
()
{}
None of the Above