on Tue, 18 Jun 2002 17:43:24 GMT, James Kipp wrote:

> Thanks everyone for your help. I am going to redo the get_stats()
> function to be 'smarter', the way it is now is much to messy.

No wonder you come to that conclusion after the odd 20, dare I say,
messy answers in this thread. 

Let's go back to one of your clarifications:

> when the get_stats() func is called $stats will contain something
> like > this: 

> $stats = [
>        [ "oracle", 6.8, 11.2 ],
>        [ "ksh", 1.8, 1.2 ],
>        ....etc....
> ];

> and $totals will have something like:
>
> $totals = [
>        [ 15.8, 17.2 ],
>        [ 3.7, 3.9 ],
>        ....etc....
> ];

> so i want to end up with something like:
> @stats = (
>        ["oracle", 6.8, 11.2,15.8, 17.2 ],
>        ["ksh", 1.8, 1.2, 3.7, 3.9 ],
>        ....etc...
>);

could this line possibly do what you want:

   push @stats, [@{$stats->[$_]}, @{$totals->[$_]}] 
            for (0..$#$stats);

under the assumption that $stats and $totals are refs to parallel
arrays? 


(Note to contributors to this thread: please remember that a reply should 
*help* the OP, not confuse him/her even further ;-)

-- 
felix

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to