wow this really really really sucks i am faving it because it's so funny "why'd you read the frikin papers you stupid little frikin dicks!!!!" rofl
DoctaBrown 3 years ago
kien eres?
kla2a 3 years ago
Ya all you have to do is put
length($str);
And finding the length of an array is also pretty easy you just go:
$size = $#myArray;
id1337x 4 years ago
The size of an array is scalar(@array). $#array gives you the last index of the array, which is usually size-1.
pudgenet 4 years ago
Both methods work. The book I'm reading ('The Web Wizards Guide to Perl and CGI') just says to use the range operator.
Well, $#array works, if you add one. Otherwise, it is not the size, it is the size minus 1. Assuming no one has changed $[, in which case $#array will be (size-($[-1)).
Better to use scalar(@array).
Hahahahaha, that's the funniest thing I've ever heard!!!
How did I miss this song?
Find length of a string in perl. LOL! Isn't it just length(string)?
GyroVorbis 4 years ago
Yes, yes it is. :-)
doida
miracimacapa 4 years ago
wow this really really really sucks i am faving it because it's so funny "why'd you read the frikin papers you stupid little frikin dicks!!!!" rofl
DoctaBrown 3 years ago
kien eres?
kla2a 3 years ago
Ya all you have to do is put
length($str);
And finding the length of an array is also pretty easy you just go:
$size = $#myArray;
id1337x 4 years ago
The size of an array is scalar(@array). $#array gives you the last index of the array, which is usually size-1.
pudgenet 4 years ago
Both methods work. The book I'm reading ('The Web Wizards Guide to Perl and CGI') just says to use the range operator.
id1337x 4 years ago
Well, $#array works, if you add one. Otherwise, it is not the size, it is the size minus 1. Assuming no one has changed $[, in which case $#array will be (size-($[-1)).
Better to use scalar(@array).
pudgenet 4 years ago
Hahahahaha, that's the funniest thing I've ever heard!!!
How did I miss this song?
Find length of a string in perl. LOL! Isn't it just length(string)?
GyroVorbis 4 years ago
Yes, yes it is. :-)
pudgenet 4 years ago
doida
miracimacapa 4 years ago