Re: printing anonymous array

2012-07-08 Thread John W. Krahn
timothy adigun wrote: [snip] my %new_hash = (); foreach my $data1 ( keys %$hash1 ) { while ( my ( $key, $value ) = each %$hash2 ) { my ($new_value) = keys %$value; $new_hash{$key} = $new_value if $data1 == $key; } } No need for the nested llops: my %new_hash; for

Re: printing anonymous array

2012-07-08 Thread Chris Stinemetz
Thank you very much. That was the solution I was looking for. Take care, Chris

Re: printing anonymous array

2012-07-08 Thread timothy adigun
Hi Chris, Please, check comments and codes below. On Sun, Jul 8, 2012 at 6:19 AM, Chris Stinemetz wrote: > Thank you very much for your responses. > > I have another question. > > I would like to replace the second element from hash1 with the second key > from %hash2 > > I believe what you

Re: printing anonymous array

2012-07-07 Thread Chris Stinemetz
Thank you very much for your responses. I have another question. I would like to replace the second element from hash1 with the second key from %hash2 Where both of the firsts keys match in the two hashes. I shortened the sample data below but there will be a match for each instances of the key

Re: printing anonymous array

2012-07-07 Thread Rob Dixon
On 07/07/2012 14:07, Chris Stinemetz wrote: Hello list, I have constructed an anonymous array with all the data I need. I am having some difficulty in accessing and printing out the data the way I want. For the sake of not cluttering this thread too much I have uploaded the anonymous array Data:

Re: printing anonymous array

2012-07-07 Thread timothy adigun
Hi, Please, I mean adjust not ajust. Thanks On Sat, Jul 7, 2012 at 10:33 PM, timothy adigun <2teezp...@gmail.com> wrote: > Hi, > Just ajust Ken's code a little and you have your output just like you > wanted it. > > On Sat, Jul 7, 2012 at 3:00 PM, Ken Slater wrote: > >> On Sat, Jul 7, 2012 at 9

Re: printing anonymous array

2012-07-07 Thread timothy adigun
Hi, Just ajust Ken's code a little and you have your output just like you wanted it. On Sat, Jul 7, 2012 at 3:00 PM, Ken Slater wrote: > On Sat, Jul 7, 2012 at 9:07 AM, Chris Stinemetz > wrote: > > Hello list, > > > > I have constructed an anonymous array with all the data I need. > > I am hav

Re: printing anonymous array

2012-07-07 Thread Ken Slater
On Sat, Jul 7, 2012 at 9:07 AM, Chris Stinemetz wrote: > Hello list, > > I have constructed an anonymous array with all the data I need. > I am having some difficulty in accessing and printing out the data the way > I want. > For the sake of not cluttering this thread too much I have uploaded the