minky arora wrote:
Hello Team,
I have a problem and I need some ideas to put me on the right track to
form an algo:
I have four 8x12 arrays (Arr1,Arr2, Arr3,Arr4) and ONE 16x24 (ARR5) array.
Now these four arrays are formatted in a particular way by a robot(
these are actually plates with wells ..I am dealing with
Bioinformatics)
I need to write a perl script to automate the reformating of these
four arrays into the one larger array.I knw the pattern that it has to
follow, for example Arr1[1][1] ->ARR5[1][2] and so on.
Given a pattern is there a good programming practice to automate the
process?Ofcourse I can run loops and make it messy.
Many thanks in advance,
It all depends on how @Arr5 is built from the others.
If you want it in the form:
[ Arr1 Arr2
Arr3 Arr4 ]
then:
@arr5 = ();
for my $i ( 0 .. 7 ){
push @arr5, [ @{$arr1[$i]}, @{$arr2[$i]} ];
}
for my $i ( 0 .. 7 ){
push @arr5, [ @{$arr3[$i]}, @{$arr4[$i]} ];
}
--
Just my 0.00000002 million dollars worth,
Shawn
"For the things we have to learn before we can do them, we learn by doing them."
Aristotle
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/