CODES Flashcards

1
Q

random number

A
my $ranNum = int(rand(#))
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

push into array

A
push(@arrayName, $pushValue)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

array length

A
my $arrLength = scalar(@arrayName)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

range

A
($startValue + .. + $lastValue)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

shift

A
shift(@arrayName)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

pop

A
pop(@arrayName)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

unshift

A
unshift(@arrayName,$newValue)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

split

A
@arrayName = split(' seperator ',$stringSentence)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

merged

A
@mergedArray = (@array1, @array2)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

join

A
$joinedString = join(' seperator ',$string1,$string2)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

splice

A
splice(@arrayName, #startingIndex,#length, $valueInserted)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly