perlquestion
adrive
looks like i need help from the monks again :(
<br>
is there a function out there for perl array that enables me to split my array like every 5 elements? say like..
<code>
my @myArray = (1..100);
my @myMainArray = ();
my $c = 1;
foreach (@myArray){
if(c++ = 5){
#1.some splitting occurs and assign to a 5 element array
#2.push 5 element array into main array
#3.reset
c = 1;
}
}
</code>
then at the end i'll be able to construct a nested loop that could extract them out like
<code>
my @myArrayResult = @myMainArray;
foreach my $o(@myArrayResult){
foreach my $i($o){
#print out
}
}
</code>