CODES Flashcards
1
Q
random number
A
my $ranNum = int(rand(#))
2
Q
push into array
A
push(@arrayName, $pushValue)
3
Q
array length
A
my $arrLength = scalar(@arrayName)
4
Q
range
A
($startValue + .. + $lastValue)
5
Q
shift
A
shift(@arrayName)
6
Q
pop
A
pop(@arrayName)
7
Q
unshift
A
unshift(@arrayName,$newValue)
8
Q
split
A
@arrayName = split(' seperator ',$stringSentence)
9
Q
merged
A
@mergedArray = (@array1, @array2)
10
Q
join
A
$joinedString = join(' seperator ',$string1,$string2)
11
Q
splice
A
splice(@arrayName, #startingIndex,#length, $valueInserted)