Chapter 4 Flashcards

1
Q

scalar variable =

A

$me = ‘scalar’;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

prints the contents (string context)

A

print “@me”;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

number of elements! (scalar context)

A

print @me; # number of elements! (scalar context)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

define your own subroutine

A

sub marine {
$n += 1; # Global variable $n
print “Hello, sailor number $n!\n”;
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A subroutine that calls

itself =

A

recursive subroutine.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly