John,

        That works much better than before, however, when i try to spin
through the hash via...


        for (keys(%data))
        {

                print $_ = $data{$_};
        }


        that only seems to get the data for the first hash passed to
%data.....%data = ( %one, %two, %three, %four );.
        BUT if I call for a specific key from %two, %three, or %four I can
get the data...i.e.

        print $data{KEY_FROM_TWO}

        I get the data I'm looking for.

        
Thanks,
Chris

> -----Original Message-----
> From: John Edwards [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, July 27, 2001 9:09 AM
> To:   'Chris Rutledge'; [EMAIL PROTECTED]
> Subject:      RE: 4 hashes into 1 hash
> 
> Try just
> 
> %data = (%one, %two, %three, %four);
> 
> you haven't got any duplicate key names have you??
> 
> John
> 
> -----Original Message-----
> From: Chris Rutledge [mailto:[EMAIL PROTECTED]]
> Sent: 27 July 2001 13:56
> To: [EMAIL PROTECTED]
> Subject: 4 hashes into 1 hash
> 
> 
> Hello all,
> 
> 
>       Here's what I have......4 single dimension hashes that I'm trying to
> use to populate a single hash (single dimension)
> 
>       with...
> 
>       %data = return_hash( %one, %two, %three, %four  );
>       
>       sub return_hash
>       {
> 
>               my ( %one, %two, %three, %four ) = @_;
>               my ( $data );
> 
>               for (keys(%one))
>               {
> 
>                       $data{$_} = $one{$_};
> 
>               }
> 
>               for (keys(%two))
>               {
> 
>                       $data{$_} = $two{$_};
> 
>               }
> 
>               for (keys(%three))
>               {
> 
>                       $data{$_} = $three{$_};
> 
>               }
> 
>               for (keys(%four))
>               {
> 
>                       $data{$_} = $four{$_};
> 
>               }
> 
>               return (%$data);
> 
> }
> 
> 
>       If this is not the correct way to do so please let me know. Am I
> clearing the "data" hash for each for loop? I do thank you for your time.
> 
> 
> Thanks in advance,
> Chris
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> --------------------------Confidentiality--------------------------.
> This E-mail is confidential.  It should not be read, copied, disclosed or
> used by any person other than the intended recipient.  Unauthorised use,
> disclosure or copying by whatever medium is strictly prohibited and may be
> unlawful.  If you have received this E-mail in error please contact the
> sender immediately and delete the E-mail from your system.
> 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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

Reply via email to