Chapter 4 Flashcards
1
Q
scalar variable =
A
$me = ‘scalar’;
2
Q
prints the contents (string context)
A
print “@me”;
3
Q
number of elements! (scalar context)
A
print @me; # number of elements! (scalar context)
4
Q
define your own subroutine
A
sub marine {
$n += 1; # Global variable $n
print “Hello, sailor number $n!\n”;
}
5
Q
A subroutine that calls
itself =
A
recursive subroutine.