Basically I want a loop to check for each value in an array, if each scalar is greater than zero. If so, I want to do something with the corresponding value in a 2nd array.
perhaps the answer to your homework looks like:
|
| handwaving here... starting with @ry1 and @ry2 being fully populated
+.
for($i=0;$i<=($#ry1 < $#ry2? $#ry1 : $#ry2){
if ($ry1[$i] != 0 ) {
$ry[$i] = <do something> # edit accordingly
}
}
I'm not too sure what your first paragraph is about, it confuses me.
Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg