RE: combining data structures into one array

2002-06-18 Thread Shishir K. Singh
push (@myVar, @$_) for @$stats; push (@myVar, @$_) for @$totals; push (@myVar, $_) for @$loads; -Original Message- From: Kipp, James [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 10:32 AM To: [EMAIL PROTECTED] Subject: combining data structures into one array I have a

RE: combining data structures into one array

2002-06-18 Thread Shishir K. Singh
: Shishir K. Singh Sent: Tuesday, June 18, 2002 10:55 AM To: Kipp, James; [EMAIL PROTECTED] Subject: RE: combining data structures into one array push (@myVar, @$_) for @$stats; push (@myVar, @$_) for @$totals; push (@myVar, $_) for @$loads; -Original Message- From: Kipp, James

RE: combining data structures into one array

2002-06-18 Thread Kipp, James
this won't work, will just push one array onto another. thanks -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 10:55 AM To: Kipp, James; [EMAIL PROTECTED] Subject: RE: combining data structures into one array push (@myVar

RE: combining data structures into one array

2002-06-18 Thread Bob Showalter
-Original Message- From: Kipp, James [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 10:32 AM To: [EMAIL PROTECTED] Subject: combining data structures into one array I have a subroutine that returns 3 array refs. so i have: my ($stats, $totals, $loads) = gets_stats();

RE: combining data structures into one array

2002-06-18 Thread Kipp, James
] thanks Cheers Shihir -Original Message- From: Shishir K. Singh Sent: Tuesday, June 18, 2002 10:55 AM To: Kipp, James; [EMAIL PROTECTED] Subject: RE: combining data structures into one array push (@myVar, @$_) for @$stats; push (@myVar, @$_) for @$totals; push (@myVar

RE: combining data structures into one array

2002-06-18 Thread Shishir K. Singh
Do you mean to say push (@$stats, @$totals, $loads); didn't work ?? -Original Message- From: Kipp, James [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 11:23 AM To: Shishir K. Singh; Kipp, James; [EMAIL PROTECTED] Subject: RE: combining data structures into one array I am

RE: combining data structures into one array

2002-06-18 Thread Kipp, James
push (@$stats, @$totals, $loads); didn't work ?? haven't tried yet. get back to you in a bit thanks again -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: combining data structures into one array

2002-06-18 Thread Kipp, James
Is there a correspondence between stats and totals, such that the nth entry in stats matches the nth entry in totals? If so, you would want to say something like: push @{$stats-[$_]}, @{$totals-[$_]}, @$loads for 0 .. $#$stats; no, there is not. i just want to combine the

RE: combining data structures into one array

2002-06-18 Thread Bob Showalter
-Original Message- From: Kipp, James [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 11:46 AM To: [EMAIL PROTECTED] Subject: RE: combining data structures into one array Is there a correspondence between stats and totals, such that the nth entry in stats matches

RE: combining data structures into one array

2002-06-18 Thread Kipp, James
], [ksh, 1.8, 1.2, 3.7, 3.9 ], etc... ); thanks. -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 11:04 AM To: Kipp, James; [EMAIL PROTECTED] Subject: RE: combining data structures into one array Oops

Re: combining data structures into one array

2002-06-18 Thread Shawn
, 3.9 ], etc... ); thanks. -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 11:04 AM To: Kipp, James; [EMAIL PROTECTED] Subject: RE: combining data structures into one array Oops..your Requirements

Re: combining data structures into one array

2002-06-18 Thread drieux
On Tuesday, June 18, 2002, at 07:32 , Kipp, James wrote: I have a subroutine that returns 3 array refs. so i have: my ($stats, $totals, $loads) = gets_stats(); would it be possible to expose this gets_stats() function - and/or re-think how it deals with generating data... ciao drieux

RE: combining data structures into one array

2002-06-18 Thread Shishir K. Singh
: Tuesday, June 18, 2002 12:40 PM To: [EMAIL PROTECTED] Subject: RE: combining data structures into one array Shishir and Bob, still can't get it to work. also decided we can leave out $loads, so basically i want to combine $stats and $totals. as bob suggested, here is sample data: ($stats, $totals

RE: combining data structures into one array

2002-06-18 Thread Kipp, James
I have a subroutine that returns 3 array refs. so i have: my ($stats, $totals, $loads) = gets_stats(); would it be possible to expose this gets_stats() function - and/or re-think how it deals with generating data... of course, that is what i am doing now :-). -- To unsubscribe,

RE: combining data structures into one array

2002-06-18 Thread Kipp, James
@stats = (user, cpu, mem, tot_cpu, tot_mem, load1, load2); You can do this # my @myVars = (); push (@myVars, @$stats, @$totals, $loads); ## tried that, it does not work. I think i have found a way

Re: combining data structures into one array

2002-06-18 Thread Shawn
- Original Message - From: Kipp, James [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 11:40 AM Subject: RE: combining data structures into one array Shishir and Bob, still can't get it to work. also decided we can leave out $loads, so basically i want to combine

RE: combining data structures into one array

2002-06-18 Thread Timothy Johnson
:56 AM To: 'Shishir K. Singh'; Kipp, James; [EMAIL PROTECTED] Subject: RE: combining data structures into one array @stats = (user, cpu, mem, tot_cpu, tot_mem, load1, load2); You can do this # my @myVars = (); push (@myVars, @$stats, @$totals

Re: combining data structures into one array

2002-06-18 Thread drieux
On Tuesday, June 18, 2002, at 09:40 , Kipp, James wrote: $totals = [ [ 15.8, 17.2 ], [ 3.7, 3.9 ], etc ]; could it be that this form is like way Ugly? note that assume a function of form: # let us Dummy up some data sub gets_Stats { my @load = qw/0.1

RE: combining data structures into one array

2002-06-18 Thread Kipp, James
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. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: combining data structures into one array

2002-06-18 Thread Kipp, James
well done. but as you said the form is way ugly. I have adjusted the sub to return array refs that i can easily deal with. -Original Message- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 1:35 PM To: begin begin Subject: Re: combining data structures into one

RE: combining data structures into one array

2002-06-18 Thread Kipp, James
cool. the 'getRemLoad' sub is going to come in handy during this project thanks. then you can unwarp it with say: http://www.wetware.com/drieux/pbl/Auslanders/gets_stats.txt ciao drieux -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

RE: combining data structures into one array

2002-06-18 Thread Felix Geerinckx
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

Re: combining data structures into one array

2002-06-18 Thread drieux
On Tuesday, June 18, 2002, at 10:52 , Kipp, James wrote: well done. but as you said the form is way ugly. I have adjusted the sub to return array refs that i can easily deal with. On Tuesday, June 18, 2002, at 09:40 , Kipp, James wrote: $totals = [ [ 15.8, 17.2 ], [ 3.7, 3.9 ],

getRemLoad is okIsh was Re: combining data structures into one array

2002-06-18 Thread drieux
On Tuesday, June 18, 2002, at 10:55 , Kipp, James wrote: cool. the 'getRemLoad' sub is going to come in handy during this project thanks. [..] then you can unwarp it with say: http://www.wetware.com/drieux/pbl/Auslanders/gets_stats.txt You might want to get in touch with