Chapter 7-8 Flashcards

1
Q

join( )=

A
my $x = join ":", 4, 6, 8, 10, 12;
# $x is "4:6:8:10:12"
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

split( )=

A
my $some_input = "This is a \t test.\nā€;
my @args = split /\s+/, $some_input;
# ("This", "is", "a", "test.")
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

split( )=

A

It splits a (scalar) string into an array, 1 word per array elements.

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