Re: dumb array/hash question

2003-04-04 Thread R. Joseph Newton
jdavis wrote: Hi Please post to the list. I did a lot of work on my reply to this, and didn't even notice till now that it had not reached the list. Pasted below: > On Tue, 2003-04-01 at 13:07, R. Joseph Newton wrote: > > jdavis wrote: > > > > I have a hash. To use this hash with a module I ne

Re: dumb array/hash question

2003-04-01 Thread R. Joseph Newton
jdavis wrote: > > I have a hash. To use this hash with a module I need it in this form... > > > > @data = ( > > ["12am","1am","2am","3am","4am","5am","6am", "7am", "8am"], ### key > > [ 251, 102, 55, 36, 113, 200,32,99, 4], ###val > > ); > > I confused.. How could I

Re: dumb array/hash question

2003-04-01 Thread Rob Dixon
Jdavis wrote: > hello, > I have a hash. To use this hash with a module I need it in this form... > > @data = ( > ["12am","1am","2am","3am","4am","5am","6am", "7am", "8am"], ### key > [ 251, 102, 55, 36, 113, 200,32,99, 4], ###val > ); > > I confused.. How could I get

Re: dumb array/hash question

2003-04-01 Thread Scott R. Godin
Jdavis wrote: > > I have a hash that i needed to put into a 2d array. > I wound up doing this... > > foreach $key (keys(%temp)){ > push(@graph_key,$key); > push(@graph_value,$temp{$key}); > } > > $data[0] = [EMAIL PROTECTED]; > $data[1] = [EMAIL PROTECTED]; > > Though Im not qu

Re: dumb array/hash question

2003-04-01 Thread Ramprasad
Jdavis wrote: I have a hash that i needed to put into a 2d array. I wound up doing this... foreach $key (keys(%temp)){ push(@graph_key,$key); push(@graph_value,$temp{$key}); } $data[0] = [EMAIL PROTECTED]; $data[1] = [EMAIL PROTECTED]; Though Im not quite sure why i need to escape t

Re: dumb array/hash question

2003-04-01 Thread jdavis
I have a hash that i needed to put into a 2d array. I wound up doing this... foreach $key (keys(%temp)){ push(@graph_key,$key); push(@graph_value,$temp{$key}); } $data[0] = [EMAIL PROTECTED]; $data[1] = [EMAIL PROTECTED]; Though Im not quite sure why i need to escape the @? but

Re: dumb array/hash question

2003-04-01 Thread Aim
Hi, Here is one way to build a hash: my %data = ( "12am" => "251", "1am" => "102" ); etc. Regards. # jdavis wrote: > hello, > I have a hash. To use this hash with a module I need it in this form... > > @data =

Re: dumb array/hash question

2003-03-31 Thread Stefan Lidman
> hello, Hi, > I have a hash. To use this hash with a module I need it in this form... > > @data = ( > ["12am","1am","2am","3am","4am","5am","6am", "7am", "8am"], ### key > [ 251, 102, 55, 36, 113, 200,32,99, 4], ###val > ); > maybe this is what you want: my @data

dumb array/hash question

2003-03-31 Thread jdavis
hello, I have a hash. To use this hash with a module I need it in this form... @data = ( ["12am","1am","2am","3am","4am","5am","6am", "7am", "8am"], ### key [ 251, 102, 55, 36, 113, 200,32,99, 4], ###val ); I confused.. How could I get a hash to the above structure