--- Chris Rutledge <[EMAIL PROTECTED]> wrote:
> 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 );
Unless I misunderstand, you're working way too hard. =o)
Try:
my %data = ( %one, %two %three, %four );
And if you want to, you can
undef %one;
undef %two;
undef %three;
undef %four;
or (leaving the hashes but emptying them):
( %one, %two %three, %four ) = ();
I don't believe you need a function.
> 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]
>
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]