in reply to Re: Hash Question
in thread Hash Question

This could be made into one line, but it's too late at night to do the formatting change:
foreach my $key (keys %hash1) { $hash1{$key} = [ defined $hash2{$key} ? ($hash1{$key}, $hash2{$key}) : $hash1{$key} ]; }
That could be made to go into a different hash, if that's your thing.

Replies are listed 'Best First'.
RE: RE: Re: Hash Question
by lindex (Friar) on Oct 06, 2000 at 22:04 UTC
    better yet :) (at least I think this will work)
    $hash3 = map { $_ => [ $hash1{$_}, $hash2{$_} ] } keys(%hash1);
    p.s. vroom should allow us to customize the size of our text fields... I work on a 20 inch monitor with I.E in fullscreen mode :)


    lindex
    /****************************/ jason@gost.net, wh@ckz.org http://jason.gost.net /*****************************/